UNPKG

tsoa-zod-validator

Version:
48 lines (47 loc) 866 B
/** * A validation error detail */ export interface ValidationErrorDetail { /** * The field path where the validation error occurred */ field: string; /** * The validation error message */ message: string; /** * The error code from Zod */ code?: string; /** * The value that failed validation */ receivedValue?: unknown; } /** * Simple validation error format */ export interface SimpleValidationError { /** * Error type */ error: string; /** * Comma-separated list of validation error messages */ message: string; } /** * Detailed validation error format */ export interface DetailedValidationError { /** * Error type */ error: string; /** * Array of validation error details */ details: ValidationErrorDetail[]; }