However, using validation against this schema on a formSubmit coerces undefined into an empty string, or inputs with no data become empty strings and this validation succeeds.
Ideally email isn't: ''
Would be handy to have some sort of way of specify minLength
Bug description
Given a user model like
produces the generated class
const UserCreateOneSchema = z.object({ email: z.string() });
However, using validation against this schema on a formSubmit coerces undefined into an empty string, or inputs with no data become empty strings and this validation succeeds.
Ideally email isn't:
''
Would be handy to have some sort of way of specify minLength
How to reproduce
Expected behavior
Prisma information
Prisma v4
Environment & setup
macOs
Prisma Version
4