Replies: 1 comment
-
onValidate is call first at form submission, and the result of this function decides if the form is submitted or not. You can decide not to return the result of parseWithZod, but store it instead, and return the parseWithZod object with the status propery overrided and set to success : A working example : |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Im using conform together with zod in my remix application. All goes fine for the normal forms. However i just got a new requirement and have not a direct answer how to handle this.
The requirement is that a form should be able to be stored in an invalid state. The only thing i want to keep is actual validation so that it is still visible for the end user. So in general, validate the form client side (onInput) but just use a regular submit of the form
Anyone an idea how to handle this?
The code above matches the schema fine but there is no way to submit it regardless the outcome. Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions