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.
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.