UNPKG

pl4y-data-library

Version:

This library contains the dtos, enums, schemas, and other data objects needed in the pl4y ecosystem.

13 lines (10 loc) 329 B
import { IsDate } from "class-validator"; import { Type } from "class-transformer"; export class CreateValidityDTO { @Type(() => Date) @IsDate({ message: "startDate must be a valid ISO date" }) startDate: Date; @Type(() => Date) @IsDate({ message: "endDate must be a valid ISO date" }) endDate: Date; }