Final Class: AsyncNumberRangeValidator

Oracle® JavaScript Extension Toolkit (JET)
9.2.0

F30740-01

Signature:

final class AsyncNumberRangeValidator<V> implements AsyncValidator<V>

QuickNav

Fields

AsyncNumberRangeValidator

Version:
  • 9.2.0
Since:
  • 8.0.0
Module:
  • ojasyncvalidator-numberrange

Module usage

See JET Module Loading for an overview of module usage within JET.

Javascript Import Format
define(['ojs/ojasyncvalidator-numberrange'], function(AsyncNumberRangeValidator) {
 // Application should call API on AsyncNumberRangeValidator 
})
Typescript Import Format
//This class is exported directly as module. To import it
import AsyncNumberRangeValidator= require("ojs/ojasyncvalidator-numberrange");

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

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.

Description

Constructs an AsyncNumberRangeValidator that ensures the value provided is within a given range.
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>