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
When using a joiResolver together with a .custom() validation function and mode 'all' it only updates the error state on submit and not on change or on blur
To Reproduce
Steps to reproduce the behavior:
Create hook form with useFieldArray
Add joi validator with .custom() validation that throws an error
the error state is only changed onSubmit and not onBlur or onChange even though mode is set to 'all'
Expected behavior
I expect the validation to happen onChange and onBlur as well.
Desktop (please complete the following information):
OS: [iOS]
Browser [Brave]
Version [Version 1.48.158 Chromium: 110.0.5481.77 (Official Build) (x86_64)]
Additional context
I did some testing and it seems like it's not to do with Joi or the JoiResolver, the errors it returns on submit and on blur are exactly the same.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using a joiResolver together with a .custom() validation function and mode 'all' it only updates the error state on submit and not on change or on blur
To Reproduce
Steps to reproduce the behavior:
Codesandbox link (Required)
https://codesandbox.io/s/react-hook-form-error-with-joi-validator-and-fieldarray-upgb54?file=/src/App.tsx
Expected behavior
I expect the validation to happen onChange and onBlur as well.
Desktop (please complete the following information):
Additional context
I did some testing and it seems like it's not to do with Joi or the JoiResolver, the errors it returns on submit and on blur are exactly the same.
The text was updated successfully, but these errors were encountered: