Final Class: AsyncRegExpValidator

Oracle® JavaScript Extension Toolkit (JET)
9.2.0

F30740-01

Signature:

final class AsyncRegExpValidator<V> implements AsyncValidator<V>

QuickNav

Fields

AsyncRegExpValidator

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

Module usage

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

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

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 AsyncRegExpValidator that ensures the value matches the provided pattern.
See:

Constructor

new AsyncRegExpValidator(options)

Parameters:
Name Type Argument Description
options RegExpValidator.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 on the expected pattern. There is no default hint for this property.

Methods

validate(value: V): Promise<void>

Validates value for matches using the regular expression provided by the pattern. This method does not raise an error when value is the empty string or null; the method returns a Promise which resolves indicating that the validation was successful. If the application wants the empty string to fail validation, then the application should chain in the required validator (e.g., set required on the input).
Parameters:
Name Type Description
value string that is being validated
Returns:
Type
Promise.<void>