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
I'm using latest yup with react-hook-forms and MUI. Sometimes, developers make a mistake of not passing the error to the UI component. If clicking on form submit causes a validation error, the form doesn't submit but there's no "easy" way to know which field is causing the error.
In a recent case, I had a form with about 20 fields. I finally wrote a validation function and then added a Validate button to the form which would log the validation error.
I'm using latest yup with react-hook-forms and MUI. Sometimes, developers make a mistake of not passing the error to the UI component. If clicking on form submit causes a validation error, the form doesn't submit but there's no "easy" way to know which field is causing the error.
In a recent case, I had a form with about 20 fields. I finally wrote a validation function and then added a Validate button to the form which would log the validation error.
I was able to find the issue with this.
Is there a way to make yup log the validation error? Or is there a way to provide a callback that will log the error?
The text was updated successfully, but these errors were encountered: