Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add support for Zod date and time string validator in addition to datetime #1725

Open
ErikDakoda opened this issue Sep 21, 2024 · 0 comments

Comments

@ErikDakoda
Copy link

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant