zod array still required?
Somehow following in my zod schema still requires my field
Submitting my form I still get
11 Replies
I’ve not used zod but I’d imagine “nullish” would mean it can be set to null. meaning a value is still required (string or null).
.optional()
would probably be what you want.Did not work, the docs say following
nullish is equivalent to
it worked on other fields which were only strings
"Expected array, received string"
you're giving it a string when it wants an array. i didnt even read the error msg tbhbut it seems there is something different with an array?
The thing is I am not giving it anything, let me double check to be sure
nah not working strange
Check you're not passing in an empty string.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Tried that still occurs 😢
What are you trying to have be nullish?
the whole array or the values within?
nvm i just read title
When I do this, this is the type i get, so that should be working.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View