blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js
https://Blitzjs.com
MIT License
13.63k stars 798 forks source link

Incorrect Zod Schema Generation for Datetime Fields when using blitz generate #4376

Closed doe-base closed 2 days ago

doe-base commented 1 week ago

What is the problem?

I noticed defining a Zod schema for datetime types seems to introduce an extra bracket z.string().datetime()(), which causes an error when handling datetime values when using blitz generate. I reviewed the issue in the codebase and it appears to be a quick fix. Will submit a pull request soon!

Paste all your error logs here:

TypeError: zod__WEBPACK_IMPORTED_MODULE_0__.z.string().datetime() is not a function