Final Class: AsyncNumberRangeValidator

Oracle® JavaScript Extension Toolkit (JET)
16.1.0

F92237-01

Since:
  • 8.0.0
Module:
  • ojasyncvalidator-numberrange

QuickNav

Fields

Description

Constructs an AsyncNumberRangeValidator that ensures the value provided is within a given range.


Usage

Signature:

final class AsyncNumberRangeValidator<V> implements AsyncValidator<V>

Typescript Import Format
//This class is exported directly as module. To import it
import AsyncNumberRangeValidator= require("ojs/ojasyncvalidator-numberrange");

For additional information visit:


Final classes in JET

Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.


See:

Constructor

new AsyncNumberRangeValidator(options)

Parameters:
Name Type Argument Description
options NumberRangeValidator.ValidatorOptions <optional>
an object literal used to provide the following properties
See:

Fields

hint :Promise.<(string|null)>

A hint message or null if no hint is available in the options. A hint message may be like "Enter a value between {min} and {max}" or "Enter a number greater than or equal to {min}"

Methods

validate(value: V): Promise<void>

Validates the minimum + maximum conditions. Returns a Promise which resolves when valid and rejects which invalid.
Parameters:
Name Type Description
value string that is being validated
Returns:
Type
Promise.<void>