Why is the shouldUseNativeValidation option overriden by shouldOnlyCheckValid? #12698
Unanswered
binarykitchen
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my app, I've enabled the
shouldUseNativeValidation
option, but notice it has zero effect. Because of this code:Code: https://github.com/react-hook-form/react-hook-form/blob/master/src/logic/createFormControl.ts#L490C1-L497C13
What's the logic behind this?
I want the native validation to be effective every time, to set the custom validity on the HTML Input element. But it appears to skip this sometimes, which breaks my app where I'm using the CSS selector
:invalid
to display whether the input is invalid or not. It doesn't always display it correctly.Any reasons why this library has above questionable logic?
Beta Was this translation helpful? Give feedback.
All reactions