Constructor
new NumberRangeValidatorFactory()
a factory method to create an instance of a built-in numberRange validator of type
oj.NumberRangeValidator.
- Source:
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
-
<static> 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. - Source:
Returns: