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
Describe the bug
The zod resolver doesn't seem to run the superRefine function correctly on form changes, it only works when changing the field defined in the path of the issue, but in this case I have errors based on the existance of data in other fields, so I expect this to work
To Reproduce
Steps to reproduce the behavior:
Go to the Codesandbox below
Write something in the "Last name" field
The "First name" field should get an error because the refine function requires first name to be defined if last name is
Writing something in the "First name" field will correctly remove the error, but removing the content in the "Last name" field will not
Expected behavior
I expect the resolver to revalidate my form when it changes, since reValidateMode is set to onChange by default, and I have not opted out of it.
The text was updated successfully, but these errors were encountered:
We have exactly the same error, we have it set that the start date must be smaller than the end date and when we set the start date later than the end date, an error appears, of course, but now if we set the end date to a later date than the start date, even though validation passes (correct behavior), the error does not disappear
Same error for us! We have a refine on a zod schema that applies an error message to the second of two form fields if the combination of both of the form fields is incorrect. We are only applying the error to the second field as that's where we would like to show the error message and autofocus on failed validation. The form does correctly pass validation if the first form field is updated, but the error on the second field never disappears. Would love to see this fixed!
Describe the bug
The zod resolver doesn't seem to run the superRefine function correctly on form changes, it only works when changing the field defined in the path of the issue, but in this case I have errors based on the existance of data in other fields, so I expect this to work
To Reproduce
Steps to reproduce the behavior:
Codesandbox link (Required)
https://codesandbox.io/p/github/MattisAbrahamsson/rhf-zod-refine-minimal-reproduction/main
Expected behavior
I expect the resolver to revalidate my form when it changes, since
reValidateMode
is set toonChange
by default, and I have not opted out of it.The text was updated successfully, but these errors were encountered: