Email Validation? #324
PerryCodes
started this conversation in
General
Replies: 1 comment
-
sorry yes this is a major typo. to get the zod email validator you'd need to add something like the following ´to your prisma schema model MyModel {
myField String /// @zod.string.email({ message: "not a valid e-mail address" }).max(255, { message: "max error" }).[...chain more validators]
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't know if this was wishful thinking? Serious typo? In the 'createPartialTypes' section in Readme.md it states:
While I doubt 'createPartialTypes' can turn
email String @unique
into that, I sure would like to know how to generate the zod email validation. Is that possible?Beta Was this translation helpful? Give feedback.
All reactions