LocaleStringValidator

Hierarchy

Implements

Index

Properties

Methods

Properties

Static describer

describer: Describer

Inherited from PatternValidator.describer

Overrides void

Methods

canValidate

canValidate(expectation: Expectation): boolean

Evaluates if validator can handle provided expectation.

Parameters:

NameTypeDescription
expectationExpectationEvaluated explicit Pattern instance or implicit expectation.

Returns: boolean

Returns true if pattern is instance of LocaleString, else false.


describe

describe(value: any): string

Inherited from PatternValidator.describe

Overrides void

Parameters:

NameType
valueany

Returns: string


validate

validate(value: any): boolean

Validates if value is undefined.

throws {ValidationError} Thrown if the argument is not undefined or not matching expectation.

Parameters:

NameTypeDescription
valueanyValue that is validated against expectation.

Returns: boolean

Returns true if value is an undefined or matches expectation, else throws.


Static getDescriber

getDescriber(): Describer

Inherited from PatternValidator.getDescriber

Overrides void

Returns: Describer


Static setDescriber

setDescriber(describer: Describer): void

Inherited from PatternValidator.setDescriber

Overrides void

Parameters:

NameType
describerDescriber

Returns: void