From b775418532551538f346cd5ef6d39997b033b809 Mon Sep 17 00:00:00 2001 From: "OMAR.A" <58332033+civilcoder55@users.noreply.github.com> Date: Fri, 3 Jan 2025 22:26:30 +0200 Subject: [PATCH] feat(common): add new flatten options to validation pipe --- content/techniques/validation.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/content/techniques/validation.md b/content/techniques/validation.md index 286ef9598f..78e525a43b 100644 --- a/content/techniques/validation.md +++ b/content/techniques/validation.md @@ -30,7 +30,7 @@ Because this pipe uses the [`class-validator`](https://github.com/typestack/clas export interface ValidationPipeOptions extends ValidatorOptions { transform?: boolean; disableErrorMessages?: boolean; - exceptionFactory?: (errors: ValidationError[]) => any; + exceptionFactory?: (errors: ValidationError[] | string[]) => any; } ``` @@ -129,6 +129,16 @@ In addition to these, all `class-validator` options (inherited from the `Validat
boolean
disableFlattenErrorMessages
boolean
ValidationError
objects, rather than being flattened into an array of strings.flatExceptionFactoryMessage
boolean