Class: ValidatorFactory

Oracle® Fusion Middleware Oracle JavaScript Extension Toolkit (JET)
12c (12.1.4)

E54107-01

QuickNav

oj. ValidatorFactory

Constructor

<abstract> new ValidatorFactory()

The contract for a ValidatorFactory that provides a factory method to create a validator by its type.
Source:

Fields

<static> VALIDATOR_TYPE_DATERESTRICTION

Default validator type for date restriction validation, used to create an instance of type oj.DateRestrictionValidator.
Source:

<static> VALIDATOR_TYPE_DATETIMERANGE

Default validator type for range validation involving datetimes, used to create an instance of type oj.DateTimeRangeValidator.
Source:

<static> VALIDATOR_TYPE_LENGTH

Default validator type for length validation, used to create an instance of type oj.LengthValidator.
Source:

<static> VALIDATOR_TYPE_NUMBERRANGE

Default validator type for range validation involving numbers, used to create an instance of type oj.NumberRangeValidator.
Source:

<static> VALIDATOR_TYPE_REGEXP

Default validator type for regular expression based validation, used to create an instance of type oj.RegExpValidator.
Source:

<static> VALIDATOR_TYPE_REQUIRED

Default validator type for required validation, used to create an instance of type oj.RequiredValidator.
Source:

Methods

<static> createValidator(options) → {Object}

Creates an immutable validator instance of the requested type. Implementations can register custom validator factories for the supported or new types.
Parameters:
Name Type Description
options Object | null an object containing the options required by the validator for its initialization. The key value pairs used in the options is implementation specific.
Source:
Throws:
if an unrecognized type was provided
Type
TypeError
Returns:
a validator instance.
Type
Object