Validator

Hierarchy

  • Validator

Implemented by

Index

Methods

Methods

getAllValidators

getAllValidators(): Map‹string, PatternValidator

Returns: Map‹string, PatternValidator

getAllValidators(): Map‹string, PatternValidator›

Returns: Map‹string, PatternValidator›


getOrder

getOrder(): string[]

Returns: string[]

getOrder(): string[]

Returns: string[]


getValidator

getValidator(kind: string): PatternValidator | undefined

Parameters:

NameType
kindstring

Returns: PatternValidator | undefined

getValidator(kind: string): PatternValidator | undefined

Parameters:

NameType
kindstring

Returns: PatternValidator | undefined


getValidatorOrThrow

getValidatorOrThrow(kind: string): PatternValidator

Parameters:

NameType
kindstring

Returns: PatternValidator

getValidatorOrThrow(kind: string): PatternValidator

Parameters:

NameType
kindstring

Returns: PatternValidator


getValidators

getValidators(): PatternValidator[]

Returns: PatternValidator[]

getValidators(): PatternValidator[]

Returns: PatternValidator[]


hasValidator

hasValidator(kind: string): boolean

Parameters:

NameType
kindstring

Returns: boolean

hasValidator(kind: string): boolean

Parameters:

NameType
kindstring

Returns: boolean


isInstanceOf

isInstanceOf(value: any, expectation: Expectation): boolean

Parameters:

NameType
valueany
expectationExpectation

Returns: boolean

isInstanceOf(value: any, expectation: Expectation): boolean

Parameters:

NameType
valueany
expectationExpectation

Returns: boolean


isValid

isValid(value: any, expectation: Expectation, isStrict?: boolean): boolean

Parameters:

NameType
valueany
expectationExpectation
isStrict?boolean

Returns: boolean

isValid(value: any, expectation: Expectation, isStrict?: boolean): boolean

Parameters:

NameType
valueany
expectationExpectation
isStrict?boolean

Returns: boolean


overrideValidator

overrideValidator(kind: string, validator: PatternValidator): void

Parameters:

NameType
kindstring
validatorPatternValidator

Returns: void

overrideValidator(kind: string, validator: PatternValidator): void

Parameters:

NameType
kindstring
validatorPatternValidator

Returns: void


registerValidator

registerValidator(kind: string, validator: PatternValidator, shouldOverride?: boolean): void

Parameters:

NameType
kindstring
validatorPatternValidator
shouldOverride?boolean

Returns: void

registerValidator(kind: string, validator: PatternValidator, shouldOverride?: boolean): void

Parameters:

NameType
kindstring
validatorPatternValidator
shouldOverride?boolean

Returns: void


removeValidator

removeValidator(kind: string): void

Parameters:

NameType
kindstring

Returns: void

removeValidator(kind: string): void

Parameters:

NameType
kindstring

Returns: void


setOrder

setOrder(order: string[]): void

Parameters:

NameType
orderstring[]

Returns: void

setOrder(order: string[]): void

Parameters:

NameType
orderstring[]

Returns: void


setValidators

setValidators(validators: Map‹string, PatternValidator›): void

Parameters:

NameType
validatorsMap‹string, PatternValidator

Returns: void

setValidators(validators: Map‹string, PatternValidator›): void

Parameters:

NameType
validatorsMap‹string, PatternValidator›

Returns: void


validate

validate(value: any, expectation: Expectation, isStrict?: boolean): boolean

Parameters:

NameType
valueany
expectationExpectation
isStrict?boolean

Returns: boolean

validate(value: any, expectation: Expectation, isStrict?: boolean): boolean

Parameters:

NameType
valueany
expectationExpectation
isStrict?boolean

Returns: boolean