0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-15 01:14:27 -05:00

fix: allow empty strings in config variable

This commit is contained in:
Elias Schneider 2022-12-08 23:21:16 +01:00
parent cbe37c6798
commit b8172efd59

View file

@ -1,7 +1,8 @@
import { IsNotEmpty } from "class-validator"; import { IsNotEmpty, ValidateIf } from "class-validator";
class UpdateConfigDTO { class UpdateConfigDTO {
@IsNotEmpty() @IsNotEmpty()
@ValidateIf((dto) => dto.value !== "")
value: string | number | boolean; value: string | number | boolean;
} }