Class: RequiredValidatorFactory

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

QuickNav


RequiredValidatorFactory

Version:
  • 7.1.0
Since:
  • 0.6
Module:
  • ojvalidation-base

Module usage

See JET Module Loading for an overview of module usage within JET.

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 {RequiredValidatorFactory} from "ojs/ojvalidation-base";

//To access this type in your code,
class MyClass implements RequiredValidatorFactory{
//or,
let myVariable: RequiredValidatorFactory;

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

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

Methods

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 oj.RequiredValidator.ValidatorOptions <optional>
an object literal used to provide an optional hint and error message. See oj.RequiredValidator for details.

Returns:
Type
oj.RequiredValidator