Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions content/techniques/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface ValidationPipeOptions extends ValidatorOptions {
transform?: boolean;
disableErrorMessages?: boolean;
exceptionFactory?: (errors: ValidationError[]) => any;
errorFormat?: 'list' | 'grouped';
}
```

Expand Down Expand Up @@ -129,6 +130,11 @@ In addition to these, all `class-validator` options (inherited from the `Validat
<td><code>boolean</code></td>
<td>When set to true, validation of the given property will stop after encountering the first error. Defaults to false.</td>
</tr>
<tr>
<td><code>errorFormat</code></td>
<td><code>'list' | 'grouped'</code></td>
<td>Specifies the format of validation error messages. <code>'list'</code> (default) returns an array of error message strings. <code>'grouped'</code> 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.</td>
</tr>
</table>

> info **Notice** Find more information about the `class-validator` package in its [repository](https://github.com/typestack/class-validator).
Expand Down