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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
Thanks for the great library.
Maybe this is helpful for somebody - or you want to add it to the documentation:
https://zsa.vercel.app/docs/forms#react-hook-form
This is how I show errors from the backend (actions) using react-hook-form
See the helper function: showInputParseError
First, it will validate the schema client side.
And if any additional checks fail in the action -> it will also display them per field.
Server side I even use the same updateZodSchema as client side. And extend / alter it where needed.
Beta Was this translation helpful? Give feedback.
All reactions