Class: RegExpValidatorFactory

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

QuickNav


RegExpValidatorFactory

Version:
  • 7.1.0
Since:
  • 0.6
Module:
  • ojvalidation-base

Module usage

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

Typescript Import Format
//This class is not exported from module and can not be accessed in runtime.
//However to enable typechecking and ducktyping, you can access it as an interface.
import {RegExpValidatorFactory} from "ojs/ojvalidation-base";

//To access this type in your code,
class MyClass implements RegExpValidatorFactory{
//or,
let myVariable: RegExpValidatorFactory;

JET In Typescript

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

A factory implementation that creates an instance of the built-in regExp validator of type oj.RegExpValidator.

Methods

createValidator(options) → {oj.RegExpValidator}

Creates an immutable validator instance of type oj.RegExpValidator that ensures the value matches the provided pattern.
Parameters:
Name Type Description
options oj.RegExpValidator.ValidatorOptions an object literal used to provide the pattern, an optional hint, error message among others. See oj.RegExpValidator for details.

Returns:
Type
oj.RegExpValidator