Class: RequiredValidatorFactory

Oracle® JavaScript Extension Toolkit (JET)
3.2.0

E87541-01

QuickNav

oj. RequiredValidatorFactory

Version:
  • 3.2.0
Since:
  • 0.6

Constructor

new RequiredValidatorFactory()

A factory implementation to create an instance of the built-in required validator of type oj.RequiredValidator.
Source:
Example

create an instance of the required validator using the factory

var rvf = oj.Validation.validatorFactory(oj.ValidatorFactory.VALIDATOR_TYPE_REQUIRED); 
var options = {'hint' : 'a value is required for this field'};
var requiredValidator = rvf.createValidator(options);

Methods

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

Creates an immutable validator instance of type @link oj.RequiredValidator that ensures that the value provided is not empty.
Parameters:
Name Type Argument Description
options Object <optional>
an object literal used to provide an optional hint and error message. See oj.RequiredValidator for details.

Source:
Returns:
Type
oj.RequiredValidator