@orbit/validators
Enumerations​
Interfaces​
- ArrayValidationOptions
- DateValidationOptions
- NumberValidationOptions
- StringValidationOptions
- ValidationIssue
- ValidationOptions
Type aliases​
ArrayValidationIssue​
Ƭ ArrayValidationIssue: TypeIssue
| MinItemsIssue
| MaxItemsIssue
Defined in​
ArrayValidator​
Ƭ ArrayValidator: Validator
<unknown
[], ArrayValidationOptions
, ArrayValidationIssue
>
Defined in​
BooleanValidationIssue​
Ƭ BooleanValidationIssue: TypeIssue
Defined in​
BooleanValidator​
Ƭ BooleanValidator: Validator
<boolean
, undefined
, BooleanValidationIssue
>
Defined in​
DateValidationIssue​
Ƭ DateValidationIssue: TypeIssue
| MinimumIssue
| MaximumIssue
| ExclusiveMinimumIssue
| ExclusiveMaximumIssue
Defined in​
DateValidator​
Ƭ DateValidator: Validator
<Date
, DateValidationOptions
, DateValidationIssue
>
Defined in​
NumberValidationIssue​
Ƭ NumberValidationIssue: TypeIssue
| MinimumIssue
| MaximumIssue
| ExclusiveMinimumIssue
| ExclusiveMaximumIssue
Defined in​
NumberValidator​
Ƭ NumberValidator: Validator
<number
, NumberValidationOptions
, NumberValidationIssue
>
Defined in​
StandardValidator​
Ƭ StandardValidator: ArrayValidator
| BooleanValidator
| DateValidator
| NumberValidator
| ObjectValidator
| StringValidator
Defined in​
StringValidationIssue​
Ƭ StringValidationIssue: TypeIssue
| MinLengthIssue
| MaxLengthIssue
Defined in​
StringValidator​
Ƭ StringValidator: Validator
<string
, StringValidationOptions
, StringValidationIssue
>
Defined in​
Validator​
Ƭ Validator<Input
, Options
, Issue
>: (input
: Input
, options?
: Options
) => undefined
| Issue
[]
Type parameters​
Name | Type |
---|---|
Input | unknown |
Options | ValidationOptions |
Issue | ValidationIssue <Input > |
Type declaration​
â–¸ (input
, options?
): undefined
| Issue
[]
Parameters​
Name | Type |
---|---|
input | Input |
options? | Options |
Returns​
undefined
| Issue
[]
Defined in​
ValidatorForFn​
Ƭ ValidatorForFn<V
>: (type
: string
) => V
| undefined
Type parameters​
Name | Type |
---|---|
V | Validator |
Type declaration​
â–¸ (type
): V
| undefined
Parameters​
Name | Type |
---|---|
type | string |
Returns​
V
| undefined
Defined in​
Variables​
standardValidators​
• standardValidators: Dict
<StandardValidator
>
Defined in​
Functions​
buildValidatorFor​
â–¸ buildValidatorFor<V
>(settings
): ValidatorForFn
<V
>
Type parameters​
Name | Type |
---|---|
V | Validator <unknown , ValidationOptions , ValidationIssue <unknown , unknown >> |
Parameters​
Name | Type |
---|---|
settings | Object |
settings.validators | Dict <V > |
Returns​
Defined in​
formatValidationDescription​
â–¸ formatValidationDescription(summary
, issues?
): string
Parameters​
Name | Type |
---|---|
summary | string |
issues? | ValidationIssue <unknown , unknown >[] |
Returns​
string
Defined in​
validateArray​
â–¸ Const
validateArray(input
, options?
): undefined
| ArrayValidationIssue
[]
Parameters​
Name | Type |
---|---|
input | unknown [] |
options? | ArrayValidationOptions |
Returns​
undefined
| ArrayValidationIssue
[]
Defined in​
validateBoolean​
â–¸ Const
validateBoolean(input
, options?
): undefined
| TypeIssue
[]
Parameters​
Name | Type |
---|---|
input | boolean |
options? | undefined |
Returns​
undefined
| TypeIssue
[]
Defined in​
validateDate​
â–¸ Const
validateDate(input
, options?
): undefined
| DateValidationIssue
[]
Parameters​
Name | Type |
---|---|
input | Date |
options? | DateValidationOptions |
Returns​
undefined
| DateValidationIssue
[]
Defined in​
validateNumber​
â–¸ Const
validateNumber(input
, options?
): undefined
| NumberValidationIssue
[]
Parameters​
Name | Type |
---|---|
input | number |
options? | NumberValidationOptions |
Returns​
undefined
| NumberValidationIssue
[]
Defined in​
validateString​
â–¸ Const
validateString(input
, options?
): undefined
| StringValidationIssue
[]
Parameters​
Name | Type |
---|---|
input | string |
options? | StringValidationOptions |
Returns​
undefined
| StringValidationIssue
[]