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
Is your feature request related to a problem? Please describe.
A way to coerce types such as Int from a Prisma schema. I am very new to both Prisma and Zod (first time using either) and seams the way to use a html input (which works with string) to represent a number type and db value type is to coerce it.
Describe the solution you'd like
Would expect to use the following in a Prisma schema.
/// @zod.coerce.number.min(1, { message: 'Number must be greater than zero'})
someNum Int
Describe alternatives you've considered
Very tedious to write onChange handlers to coerce things manually.
Additional context
Error message [@zod generator error]: 'coerce' is not a valid validator type.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
A way to
coerce
types such asInt
from a Prisma schema. I am very new to both Prisma and Zod (first time using either) and seams the way to use ahtml
input (which works with string) to represent a number type and db value type is tocoerce
it.Describe the solution you'd like
Would expect to use the following in a Prisma schema.
Describe alternatives you've considered
Very tedious to write
onChange
handlers to coerce things manually.Additional context
Error message
[@zod generator error]: 'coerce' is not a valid validator type.
The text was updated successfully, but these errors were encountered: