Class: NumberRangeValidatorFactory

Oracle® JavaScript Extension Toolkit (JET)
5.0.0

E90577-01

QuickNav

NumberRangeValidatorFactory

Version:
  • 5.0.0
Since:
  • 0.6
Module:
  • ojvalidation-number
a factory method to create an instance of a built-in numberRange validator of type oj.NumberRangeValidator.
Example

create an instance of the numberRange validator using the factory

var lrvf = oj.Validation.validatorFactory(oj.ValidatorFactory.VALIDATOR_TYPE_NUMBER_RANGE);
var options = {hint: {min: 'Enter a value greater than {min}'}, min: 100};
var lrValidator = lrvf.createValidator(options);

Methods

createValidator(options) → {oj.NumberRangeValidator}

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

Returns:
Type
oj.NumberRangeValidator