zenstack
zenstack copied to clipboard
[Feature Request] Add support for Zod date and time string validator in addition to datetime
Zod 3.23 added support for date and time string validators.
The z.string().date() method validates strings in the format YYYY-MM-DD.
The z.string().time() method validates strings in the format HH:MM:SS[.s+]. The second can include arbitrary decimal precision. It does not allow timezone offsets of any kind.
ZenStack does not currently support the following:
startDay String @db.VarChar(10) @date("Please enter a valid date")
startTime String @db.VarChar(12) @time(0, "Please enter a valid time")