You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Fabio, great to see someone using zod to validate forms in Remix, thank!
I have a question regarding how you access the errors in the form. How do you handle a situation where the "name" field has no error and the "email" has an error? Zod would return an array of one error, with the error at issue location [0]. This would be picked up by name in your form, rather than email, as you have used actionData?.error?.issues[0].message. Is there a better way of accessing the issue for the form field name?
Form and data validation with ZOD
Remix brings us back to the olden days of web development by relying on web fundamentals. In practice, this means leaving it to the browser to do t...
https://remix-cookbook.com/form-and-data-validation-with-zod
The text was updated successfully, but these errors were encountered: