Is there a way to enable verbose output when Zod schema validation fails on the client side? #332
-
The question is in the title 😉 I'm encountering an issue where it's difficult to understand why Zod schema validation fails on the client side, especially when an error isn't captured in the user interface. To identify the problem, I often have to disable client-side validation, relying instead on server-side action validation for insights. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Do you mean inspecting the zod error? As you mentioned about the server side action, if the submission object itself would be enough for you, you can console log the result of the parse function in your onValidate handler before returning it. |
Beta Was this translation helpful? Give feedback.
Do you mean inspecting the zod error? As you mentioned about the server side action, if the submission object itself would be enough for you, you can console log the result of the parse function in your onValidate handler before returning it.