Can't use serverValidate with arrays [Zod, React Router 7] #1853
Unanswered
Visible-Radio
asked this question in
Q&A
Replies: 0 comments
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.
-
Based on the docs I can not figure out if it is possible to work with arrays in a React Router Framework action. I want to work with the same data structure in the action as is created in the client side form state. The types for serverValidate suggest this is how it works. But it doesn't seem to be the case.
I was expecting
serverValidateto work kind of like conform'sparseWithZod, where you get objects matching the zod schema to work with, in addition to a first class way of returning validation errors from the server.Beta Was this translation helpful? Give feedback.
All reactions