Interface: Validator

Oracle® JavaScript Extension Toolkit (JET)
17.0.0

F92240-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