Class: LengthValidatorFactory

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. LengthValidatorFactory

Version:
  • 3.2.0
Since:
  • 0.6

Constructor

new LengthValidatorFactory()

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

create an instance of the length validator using the factory

var lvf = oj.Validation.validatorFactory(oj.ValidatorFactory.VALIDATOR_TYPE_LENGTH);
var options = {hint: {max: 'Enter {max} or fewer characters'}, max: 10};
var lValidator = lvf.createValidator(options);

Methods

<static> 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 Object <optional>
an object literal used to provide the 'minimum', 'maximum' and other optional values. See oj.LengthValidator for details.

Source:
Returns:
Type
oj.LengthValidator