Class: LengthValidatorFactory

Oracle® JavaScript Extension Toolkit (JET)
17.1.0

G12196-01

Since:
  • 0.6.0
Module:
  • ojvalidationfactory-base

Note: This class is deprecated since 17.0.0. Directly create new instances of LengthValidator instead.

QuickNav

Description

Returns an instance of oj.LengthValidatorFactory that provides a factory method to create an instance of a length validator.


Usage

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 {LengthValidatorFactory} from "ojs/ojvalidationfactory-base";

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

For additional information visit:


Returns an instance of oj.LengthValidatorFactory that provides a factory method to create an instance of a length validator.

Methods

createValidator(options) : {oj.LengthValidator}

Creates an immutable validator instance of type oj.LengthValidator that ensures that the value provided is withing a given length.
Parameters:
Name Type Argument Description
options oj.LengthValidator.ValidatorOptions <optional>
an object literal used to provide the 'minimum', 'maximum' and other optional values. See oj.LengthValidator for details.

Returns:
Type
oj.LengthValidator