Next.js Discord

Discord Forum

Validating file input with zod

Answered
American black bear posted this in #help-forum
Open in Discord
American black bearOP
I am facing an issue where i cant seem to validate the file input for my form in my zod schema. Does anybody know a way to do so? thanks
Answered by American black bear
solution found, needed to change the schema to this:
View full answer

3 Replies

American black bearOP
even when the file is uploaded it gives back an error
this is my current zod schema
American black bearOP
solution found, needed to change the schema to this:
Answer