-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation does't work correctly using Controller and react-select #1931
Comments
can you provide a |
I'm amazed on how quick your response is in answering every issue and fixing them if needed. 👏👏 Thanks for you hard work! |
no worries @tafelito I try my best 🙉 |
By the way, since the next version will deprecate valisationSchema, it would be great if somehow the validation resolver could tell what field is changing the value, specially after the a form is submitted and the validation occurs on the onChange event, to validate only the field that is changing and not the whole schema. I found that with complex schemas it can get very slow and you notice a lag while typing |
for schema it will be quite difficult to achieve, we do that for build-in validation tho. |
for schema yes, but what about for the resolver? There, if you get the field, one can decide to validate the whole schema of just the field |
@bluebill1049 are you going to release this on V6 or are you planning on release a patch for v5? |
hey @tafelito we going to release V6. |
Can anyone help me validate? |
Care to elaborate? |
Describe the bug
when using a react-select component with controller, the validation does not work properl when using
reValidateMode: 'onBlur'
the select component is validating onBlur all the time, not only after the form was submitted. As i Understand, by using the
reValidateMode: 'onBlur'
makes the inputs validates onBlur instead of onChange. But the select is validating onBlur even when the form was not submittedhere's the codesandbox
https://codesandbox.io/s/react-hook-form-usefieldarray-template-mj7vm?file=/src/index.js
The text was updated successfully, but these errors were encountered: