Copied from class-validator/validation/ValidationError.d.ts
• children: ValidationError[]
Defined in src/Errors/ValidationError.ts:36
Contains all nested validation errors of the property.
Optional
constraints• constraints? : object
Defined in src/Errors/ValidationError.ts:29
Constraints that failed validation with error messages.
Optional
contexts• contexts? : object
Defined in src/Errors/ValidationError.ts:41
• property: string
Defined in src/Errors/ValidationError.ts:17
Object’s property that haven’t pass validation.
Optional
target• target? : object
Defined in src/Errors/ValidationError.ts:12
Object that was validated.
OPTIONAL - configurable via the ValidatorOptions.validationError.target option
Optional
value• value? : any
Defined in src/Errors/ValidationError.ts:24
Value that haven’t pass a validation.
OPTIONAL - configurable via the ValidatorOptions.validationError.value option
â–¸ toString(shouldDecorate?
: boolean, hasParent?
: boolean, parentPath?
: string): string
Defined in src/Errors/ValidationError.ts:50
Parameters:
Name | Type | Description |
---|---|---|
shouldDecorate? |
boolean | decorate the message with ANSI formatter escape codes for better readability |
hasParent? |
boolean | true when the error is a child of an another one |
parentPath? |
string | path as string to the parent of this property |
Returns: string