-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Report hasn't been filed before.
- I have verified that the bug I'm about to report hasn't been filed before.
Other packages
drizzle-zod@0.8.2
Describe the Bug
For column of type date({ mode: 'string' }) drizzle-zod uses z.string()
But zod 4 has z.iso.date type which represents specifically string iso date: https://zod.dev/api?id=iso-dates which validates format YYYY-MM-DD which is format the column with date({ mode: 'string' }) type will return.
Currently there is a test in drizzle-zod for this case which ensures date({ mode: 'string' }) will become z.string()
https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-zod/tests/pg.test.ts#L416
https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-zod/tests/pg.test.ts#L464
Introducing of this will be a breaking change.
Do you think we can implement such behavior?
Would you be open for a PR for this change?
aaronchilcott, MrShish and qweered