Usage
Javascript Import Format
define(['ojs/ojvalidationfactory-datetime'], function(validationfactoryDatetime) { // Application should call API on validationfactoryDatetime.DateTimeRangeValidatorFactory })
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 {DateTimeRangeValidatorFactory} from "ojs/ojvalidationfactory-datetime";
//To access this type in your code,
class MyClass implements DateTimeRangeValidatorFactory{
//or,
let myVariable: DateTimeRangeValidatorFactory;
For additional information visit:
a factory implementation to create an instance of the built-in dateTimeRange validator of type
oj.DateTimeRangeValidator.
Methods
-
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
oj.DateTimeRangeValidator.ValidatorOptions <optional>
an object literal used to provide the minimum, maximum and other optional values. See oj.DateTimeRangeValidator for details. Returns: