You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's worth nothing that "String?" is producing a nullable field, which produces a required validation in forms. I need an optional field, which I achieved using a custom modifier.
Package versions (please complete the following information):
"zod": "^3.22.4",
"zod-prisma-types": "^3.1.6"
The text was updated successfully, but these errors were encountered:
exportconstEntitySchema=z.object({id: z.string().cuid(),field: z.string().nullish(),// null or undefinedfieldWorkaround: z.string().optional().nullish(),//null or undefined})
Describe the bug
My Prisma model is like this:
My generated Zod type is like that:
It's worth nothing that "String?" is producing a nullable field, which produces a required validation in forms. I need an optional field, which I achieved using a custom modifier.
Package versions (please complete the following information):
"zod": "^3.22.4",
"zod-prisma-types": "^3.1.6"
The text was updated successfully, but these errors were encountered: