diff --git a/packages/common/pipes/validation.pipe.ts b/packages/common/pipes/validation.pipe.ts index ede40fb80eb..a801fa64ce7 100644 --- a/packages/common/pipes/validation.pipe.ts +++ b/packages/common/pipes/validation.pipe.ts @@ -206,10 +206,7 @@ export class ValidationPipe implements PipeTransform { if (metatype === Number) { return +value; } - if (metatype === String) { - if (isUndefined(value)) { - return undefined; - } + if (metatype === String && !isUndefined(value)) { return String(value); } return value;