diff --git a/content/techniques/validation.md b/content/techniques/validation.md index a7f59fdc55..ab9d28cdab 100644 --- a/content/techniques/validation.md +++ b/content/techniques/validation.md @@ -31,6 +31,7 @@ export interface ValidationPipeOptions extends ValidatorOptions { transform?: boolean; disableErrorMessages?: boolean; exceptionFactory?: (errors: ValidationError[]) => any; + errorFormat?: 'list' | 'grouped'; } ``` @@ -129,6 +130,11 @@ In addition to these, all `class-validator` options (inherited from the `Validat
booleanerrorFormat'list' | 'grouped''list' (default) returns an array of error message strings. 'grouped' returns an object with property paths as keys and arrays of unmodified error messages as values, preserving custom validation messages without prepending parent path prefixes.