add array min size check on schedule property

This commit is contained in:
Sylvain Briat
2024-03-29 15:09:32 +01:00
parent bd6fc1576b
commit 212b609e26

View File

@@ -57,6 +57,7 @@ export class MatchRequestDto {
@Type(() => ScheduleItemDto)
@IsArray()
@ArrayMinSize(1)
@IsOptional()
@ValidateNested({ each: true })
schedule?: ScheduleItemDto[];