fix validation

This commit is contained in:
Mhd Zayd Skaff
2025-07-20 13:49:15 +03:00
parent 212d0d1974
commit 87c380ab6f

View File

@ -7,8 +7,8 @@ export class BookingRequestDto {
example: '07-2025', example: '07-2025',
}) })
@IsNotEmpty() @IsNotEmpty()
@Matches(/^(0[1-9]|1[0-2])\/\d{4}$/, { @Matches(/^(0[1-9]|1[0-2])\-\d{4}$/, {
message: 'Date must be in MM-YYYY format', message: 'Date must be in MM/YYYY format',
}) })
month: string; month: string;