Validator
Hierarchy
- Validator
Implemented by
Index
Methods
- getAllValidators
- getOrder
- getValidator
- getValidatorOrThrow
- getValidators
- hasValidator
- isInstanceOf
- isValid
- overrideValidator
- registerValidator
- removeValidator
- setOrder
- setValidators
- validate
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:
Name | Type |
---|---|
kind | string |
Returns: PatternValidator | undefined
▸ getValidator(kind
: string): PatternValidator | undefined
Parameters:
Name | Type |
---|---|
kind | string |
Returns: PatternValidator | undefined
getValidatorOrThrow
▸ getValidatorOrThrow(kind
: string): PatternValidator
Parameters:
Name | Type |
---|---|
kind | string |
Returns: PatternValidator
▸ getValidatorOrThrow(kind
: string): PatternValidator
Parameters:
Name | Type |
---|---|
kind | string |
Returns: PatternValidator
getValidators
▸ getValidators(): PatternValidator[]
Returns: PatternValidator[]
▸ getValidators(): PatternValidator[]
Returns: PatternValidator[]
hasValidator
▸ hasValidator(kind
: string): boolean
Parameters:
Name | Type |
---|---|
kind | string |
Returns: boolean
▸ hasValidator(kind
: string): boolean
Parameters:
Name | Type |
---|---|
kind | string |
Returns: boolean
isInstanceOf
▸ isInstanceOf(value
: any, expectation
: Expectation): boolean
Parameters:
Name | Type |
---|---|
value | any |
expectation | Expectation |
Returns: boolean
▸ isInstanceOf(value
: any, expectation
: Expectation): boolean
Parameters:
Name | Type |
---|---|
value | any |
expectation | Expectation |
Returns: boolean
isValid
▸ isValid(value
: any, expectation
: Expectation, isStrict?
: boolean): boolean
Parameters:
Name | Type |
---|---|
value | any |
expectation | Expectation |
isStrict? | boolean |
Returns: boolean
▸ isValid(value
: any, expectation
: Expectation, isStrict?
: boolean): boolean
Parameters:
Name | Type |
---|---|
value | any |
expectation | Expectation |
isStrict? | boolean |
Returns: boolean
overrideValidator
▸ overrideValidator(kind
: string, validator
: PatternValidator): void
Parameters:
Name | Type |
---|---|
kind | string |
validator | PatternValidator |
Returns: void
▸ overrideValidator(kind
: string, validator
: PatternValidator): void
Parameters:
Name | Type |
---|---|
kind | string |
validator | PatternValidator |
Returns: void
registerValidator
▸ registerValidator(kind
: string, validator
: PatternValidator, shouldOverride?
: boolean): void
Parameters:
Name | Type |
---|---|
kind | string |
validator | PatternValidator |
shouldOverride? | boolean |
Returns: void
▸ registerValidator(kind
: string, validator
: PatternValidator, shouldOverride?
: boolean): void
Parameters:
Name | Type |
---|---|
kind | string |
validator | PatternValidator |
shouldOverride? | boolean |
Returns: void
removeValidator
▸ removeValidator(kind
: string): void
Parameters:
Name | Type |
---|---|
kind | string |
Returns: void
▸ removeValidator(kind
: string): void
Parameters:
Name | Type |
---|---|
kind | string |
Returns: void
setOrder
▸ setOrder(order
: string[]): void
Parameters:
Name | Type |
---|---|
order | string[] |
Returns: void
▸ setOrder(order
: string[]): void
Parameters:
Name | Type |
---|---|
order | string[] |
Returns: void
setValidators
▸ setValidators(validators
: Map‹string, PatternValidator›): void
Parameters:
Name | Type |
---|---|
validators | Map‹string, PatternValidator› |
Returns: void
▸ setValidators(validators
: Map‹string, PatternValidator›): void
Parameters:
Name | Type |
---|---|
validators | Map‹string, PatternValidator› |
Returns: void
validate
▸ validate(value
: any, expectation
: Expectation, isStrict?
: boolean): boolean
Parameters:
Name | Type |
---|---|
value | any |
expectation | Expectation |
isStrict? | boolean |
Returns: boolean
▸ validate(value
: any, expectation
: Expectation, isStrict?
: boolean): boolean
Parameters:
Name | Type |
---|---|
value | any |
expectation | Expectation |
isStrict? | boolean |
Returns: boolean