issue: setValue doesn't clear errors #7897
-
Version Number7.22 Codesandbox/Expo snackhttps://codesandbox.io/s/react-hook-form-datepicker-range-j1kryq?file=/src/App.js Steps to reproduce
Expected behaviourThe error disappear / cleared if we invoke setValue method What browsers are you seeing the problem on?Firefox, Chrome, Safari, Edge Relevant log outputNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Answered by
bluebill1049
Feb 23, 2022
Replies: 2 comments 3 replies
-
incorrect API usage, for clear custom error, you should use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
anshour
-
And i wanna ask is that ok to set the value input with watch function and bind onChange event with setValue?
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
incorrect API usage, for clear custom error, you should use
clearError
https://react-hook-form.com/api/useform/clearerrors API.