-
-
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
Using yup with onChange or onBlur mode #23
Comments
thanks @dioklecijan I will look into that and get it fixed :) |
This issue has been fixed https://github.com/bluebill1049/react-hook-form/releases/tag/v3.0.3 |
Yep. Thanks! |
I'm finding that |
@subvertallchris which comment & can you post the link of the CSB? |
You can use this https://codesandbox.io/embed/react-hook-form-validationschema-vk3s4?fontsize=14&hidenavigation=1&theme=dark. It's the CSB from your very last comment before now with |
@subvertallchris i am going to sleep now, can you make sure use the latest version? in case that's the fix. |
Updated it to use the current version, which I'm also running locally -- no change. Thanks for quick reply and all your work on this library, it's excellent! |
@subvertallchris that's correct behaviour for reValidateMode: "onBlur". you want to change your mode to "onBlur" |
😮! I saw |
all good, sorry for the late reply. i was tired last night and went to bed. |
Oh man, nothing to apologize for! My day is just starting as yours is ending. This was a great turnaround time. FYI I've already got your library in production and it's going to be part of every form in the project, it's providing a great value already. Thank you for all your hard work. |
Describe the bug
onChange and onBlur mode doesn't work with yup validation schema or I miss something :)
To Reproduce
Steps to reproduce the behavior:
mode: 'onBlur
:firstName
and/orage
fields and watch stringified errors object.It looks like that clearing error works OK, but setting error does not.
Expected behavior
Expected error message for empty
firstName
field after leaving field.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: