Class: DateTimeRangeValidatorFactory

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. DateTimeRangeValidatorFactory

Version:
  • 3.2.0
Since:
  • 0.6

Constructor

new DateTimeRangeValidatorFactory()

a factory implementation to create an instance of the built-in dateTimeRange validator of type oj.DateTimeRangeValidator.
Source:
Example

create an instance of the dateTimeRange validator using the factory

var drvf = oj.Validation.validatorFactory(oj.ValidatorFactory.VALIDATOR_TYPE_DATETIMERANGE);  
var birthdateOptions = {min: new Date(1930, 00, 01), max: new Date(1995, 11,31)};
var birthdateValidator = drvf.createValidator(birthdateOptions);
 

Methods

<static> createValidator(options) → {oj.DateTimeRangeValidator}

Creates an immutable validator instance of type oj.DateTimeRangeValidator that ensures that the (datetime) 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.DateTimeRangeValidator for details.

Source:
Returns:
Type
oj.DateTimeRangeValidator