react-hook-form: mode onBlur/onChange not working with custom resolver
Describe the bug
When using a custom validation resolver, the validation is only triggered on submit, even with mode set to onBlur or onChange.
To Reproduce Build a custom resolver based on the custom resolver example from the api docs or use my example provided in my evaluation project.
Codesandbox link (Required) https://codesandbox.io/s/focused-cache-oeki7
Expected behavior
I expect the the validation to be triggered according to the chosen mode while using a custom resolver.
Screenshots https://imgshare.io/image/custom-resolver-onblur.NM1mug
Desktop (please complete the following information):
- OS: Windows 10 (WSL2/Ubuntu)
- Browser: Chrome
- Version: 84
Best regards, Tobias
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (8 by maintainers)
PR with examples created: https://github.com/react-hook-form/react-hook-form/pull/2630
feel free to contribute to the doc and send PRs.
please follow up with a
codesandboxto reproduce this issue, I will reopen if the issue is confirmed. our mode / revlidatedMode is covered by test and automation, and most likely probably just a misunderstanding.