Final Class: AsyncLengthValidator

Oracle® JavaScript Extension Toolkit (JET)
9.2.0

F30740-01

Signature:

final class AsyncLengthValidator<V> implements AsyncValidator<V>

QuickNav

Fields

AsyncLengthValidator

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

Module usage

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

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

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 AsyncLengthValidator ensures the value entered is within a given length.
See:

Constructor

new AsyncLengthValidator(options)

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

Fields

hint :Promise.<(string|null)>

A message to be used as hint, when giving a hint about the expected length. There is no default hint for this property.

Methods

validate(value: V): Promise<void>

Validates the length of value is greater than minimum and/or less than maximum. 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>