ValidationError
Validation error description.
interface ValidationError {
target?: Record<string, any>
property: string
value?: any
constraints?: {...}
children?: ValidationError[]
contexts?: {...}
}
See also
Properties
Property | Description |
---|---|
target?: Record<string, any>
|
Object that was validated. OPTIONAL - configurable via the ValidatorOptions.validationError.target option |
property: string
|
Object's property that hasn't passed validation. |
value?: any
|
Value that haven't pass a validation. OPTIONAL - configurable via the ValidatorOptions.validationError.value option |
constraints?: {
[type: string]: string;
}
|
Constraints that failed validation with error messages. |
children?: ValidationError[]
|
Contains all nested validation errors of the property. |
contexts?: {
[type: string]: any;
}
|
A transient set of data passed through to the validation result for response mapping |