diff --git a/src/interfaces/DTO/worryDTO.ts b/src/interfaces/DTO/worryDTO.ts index 02dc043..e9db922 100644 --- a/src/interfaces/DTO/worryDTO.ts +++ b/src/interfaces/DTO/worryDTO.ts @@ -1,4 +1,4 @@ -import { IsString, IsDefined, IsNumber, IsArray, IsNotEmpty, isNumber} from 'class-validator'; +import { IsString, IsDefined, IsNumber, IsArray, IsNotEmpty, isNumber, ArrayNotEmpty} from 'class-validator'; class worryCreateDTO { @@ -15,6 +15,7 @@ class worryCreateDTO { title!: string; @IsDefined() + @ArrayNotEmpty() @IsArray() answers!: Array;