Use Prisma Enums in Runtime Validator
Can I use Prisma's generated enums in a zod runtime validator?
I have in the
@prisma/client
this:
the goal is to do something like
but the Language isn't a real object. is there any workarounds to do this?2 Replies
z.nativeEnum
should work, no?Thanks, didn't know that was a thing. Works like wonders