Skip to main content
Version: 0.17

@orbit/validators

Enumerations​

Interfaces​

Type aliases​

ArrayValidationIssue​

Ƭ ArrayValidationIssue: TypeIssue | MinItemsIssue | MaxItemsIssue

Defined in​

array-validator.ts:25


ArrayValidator​

Ƭ ArrayValidator: Validator<unknown[], ArrayValidationOptions, ArrayValidationIssue>

Defined in​

array-validator.ts:32


BooleanValidationIssue​

Ƭ BooleanValidationIssue: TypeIssue

Defined in​

boolean-validator.ts:11


BooleanValidator​

Ƭ BooleanValidator: Validator<boolean, undefined, BooleanValidationIssue>

Defined in​

boolean-validator.ts:13


DateValidationIssue​

Ƭ DateValidationIssue: TypeIssue | MinimumIssue | MaximumIssue | ExclusiveMinimumIssue | ExclusiveMaximumIssue

Defined in​

date-validator.ts:39


DateValidator​

Ƭ DateValidator: Validator<Date, DateValidationOptions, DateValidationIssue>

Defined in​

date-validator.ts:53


NumberValidationIssue​

Ƭ NumberValidationIssue: TypeIssue | MinimumIssue | MaximumIssue | ExclusiveMinimumIssue | ExclusiveMaximumIssue

Defined in​

number-validator.ts:39


NumberValidator​

Ƭ NumberValidator: Validator<number, NumberValidationOptions, NumberValidationIssue>

Defined in​

number-validator.ts:53


StandardValidator​

Ƭ StandardValidator: ArrayValidator | BooleanValidator | DateValidator | NumberValidator | ObjectValidator | StringValidator

Defined in​

standard-validators.ts:19


StringValidationIssue​

Ƭ StringValidationIssue: TypeIssue | MinLengthIssue | MaxLengthIssue

Defined in​

string-validator.ts:25


StringValidator​

Ƭ StringValidator: Validator<string, StringValidationOptions, StringValidationIssue>

Defined in​

string-validator.ts:32


Validator​

Ƭ Validator<Input, Options, Issue>: (input: Input, options?: Options) => undefined | Issue[]

Type parameters​

NameType
Inputunknown
OptionsValidationOptions
IssueValidationIssue<Input>

Type declaration​

â–¸ (input, options?): undefined | Issue[]

Parameters​
NameType
inputInput
options?Options
Returns​

undefined | Issue[]

Defined in​

validator.ts:38


ValidatorForFn​

Ƭ ValidatorForFn<V>: (type: string) => V | undefined

Type parameters​

NameType
VValidator

Type declaration​

â–¸ (type): V | undefined

Parameters​
NameType
typestring
Returns​

V | undefined

Defined in​

validator-builder.ts:4

Variables​

standardValidators​

• standardValidators: Dict<StandardValidator>

Defined in​

standard-validators.ts:27

Functions​

buildValidatorFor​

â–¸ buildValidatorFor<V>(settings): ValidatorForFn<V>

Type parameters​

NameType
VValidator<unknown, ValidationOptions, ValidationIssue<unknown, unknown>>

Parameters​

NameType
settingsObject
settings.validatorsDict<V>

Returns​

ValidatorForFn<V>

Defined in​

validator-builder.ts:6


formatValidationDescription​

â–¸ formatValidationDescription(summary, issues?): string

Parameters​

NameType
summarystring
issues?ValidationIssue<unknown, unknown>[]

Returns​

string

Defined in​

validator.ts:44


validateArray​

â–¸ Const validateArray(input, options?): undefined | ArrayValidationIssue[]

Parameters​

NameType
inputunknown[]
options?ArrayValidationOptions

Returns​

undefined | ArrayValidationIssue[]

Defined in​

array-validator.ts:38


validateBoolean​

â–¸ Const validateBoolean(input, options?): undefined | TypeIssue[]

Parameters​

NameType
inputboolean
options?undefined

Returns​

undefined | TypeIssue[]

Defined in​

boolean-validator.ts:19


validateDate​

â–¸ Const validateDate(input, options?): undefined | DateValidationIssue[]

Parameters​

NameType
inputDate
options?DateValidationOptions

Returns​

undefined | DateValidationIssue[]

Defined in​

date-validator.ts:59


validateNumber​

â–¸ Const validateNumber(input, options?): undefined | NumberValidationIssue[]

Parameters​

NameType
inputnumber
options?NumberValidationOptions

Returns​

undefined | NumberValidationIssue[]

Defined in​

number-validator.ts:59


validateString​

â–¸ Const validateString(input, options?): undefined | StringValidationIssue[]

Parameters​

NameType
inputstring
options?StringValidationOptions

Returns​

undefined | StringValidationIssue[]

Defined in​

string-validator.ts:38