From b8172efd59fb3271ab9b818b13a7003342b2cebd Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Thu, 8 Dec 2022 23:21:16 +0100 Subject: [PATCH] fix: allow empty strings in config variable --- backend/src/config/dto/updateConfig.dto.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/config/dto/updateConfig.dto.ts b/backend/src/config/dto/updateConfig.dto.ts index 3460bd26..4be8c663 100644 --- a/backend/src/config/dto/updateConfig.dto.ts +++ b/backend/src/config/dto/updateConfig.dto.ts @@ -1,7 +1,8 @@ -import { IsNotEmpty } from "class-validator"; +import { IsNotEmpty, ValidateIf } from "class-validator"; class UpdateConfigDTO { @IsNotEmpty() + @ValidateIf((dto) => dto.value !== "") value: string | number | boolean; }