Skip to content

Commit 423a0d0

Browse files
committed
fix: validating string date in request body
1 parent 8a02110 commit 423a0d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/backend/src/research/participants/participant.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { ApiProperty, OmitType, PartialType } from "@nestjs/swagger";
22
import { Type } from "class-transformer";
3-
import { IsDate, IsOptional } from "class-validator";
3+
import { IsDateString, IsOptional } from "class-validator";
44

55
export class ParticipantDto {
66
@ApiProperty({ example: 1, description: "The id of the participant (child id)" })
77
id: number;
88

99
@ApiProperty({ example: "2024-11-01T00:05:02.718Z", description: "The birthday of the participant" })
10-
@IsDate()
10+
@IsDateString()
1111
@IsOptional()
1212
birthday?: Date;
1313

0 commit comments

Comments
 (0)