UNPKG

@nestjs/common

Version:

Nest - modern, fast, powerful node.js web framework (@common)

43 lines (42 loc) 1.03 kB
/** * Validation error description. * @see https://github.com/typestack/class-validator * * class-validator@0.13.0 * * @publicApi */ export interface ValidationError { /** * Object that was validated. * * OPTIONAL - configurable via the ValidatorOptions.validationError.target option */ target?: Record<string, any>; /** * Object's property that hasn't passed validation. */ property: string; /** * Value that haven't pass a validation. * * OPTIONAL - configurable via the ValidatorOptions.validationError.value option */ value?: any; /** * Constraints that failed validation with error messages. */ constraints?: { [type: string]: string; }; /** * Contains all nested validation errors of the property. */ children?: ValidationError[]; /** * A transient set of data passed through to the validation result for response mapping */ contexts?: { [type: string]: any; }; }