Closed JoostKiens closed 4 years ago
I have added an example that shows this behavior. Not sure what causes the problem in your test case.
Thanks for the example!
Not sure what causes the problem in your test case.
After investigating a bit, I found out it seems to be an issue in Firefox & Safari. This is also the case with your example. In Chrome it works as expected.
Let me know if you find a workaround
Seems we are not alone: https://github.com/react-hook-form/react-hook-form/issues/1079
Looks like browser bugs. Reports going back to 2007 😳.
Seems I'll just have to accept that this is the world we live in. Closing, thanks for your time 👍
https://bugs.webkit.org/show_bug.cgi?id=13724 https://bugzilla.mozilla.org/show_bug.cgi?id=756028
If we feel this is really important we could write a custom onBlur
.
Is it possible to show a validation error of a checkbox on blur?
See the following test case:
I would expect the error to be shown as soon as we uncheck the checkbox. However,
showError
is alwaysfalse
until we submit the form.