Interface: Validator

Oracle® JavaScript Extension Toolkit (JET)
17.1.0

G12196-01

Since:
  • 0.6.0
Module:
  • ojvalidator

QuickNav

Usage

Signature:

interface Validator<V>

Generic Parameters
ParameterDescription
VType of value to be validated
Typescript Import Format
//To use this interface, import as below.
import Validator= require("ojs/ojvalidator");

//To access this interface in your code:
declare class MyValidator implements Validator

For additional information visit:


Methods

getHint(): string|null

Returns a hint that describes the validator rule.
Returns:

a hint string or null

Type
string | null

validate(value) : {void}

Validates the value. The function typically returns if the validation passes and throws an error if it fails.
Parameters:
Name Type Description
value V to be validated
Throws:
if validation fails
Type
Error
Returns:
Type
void