Errors doesn't clear on change while using `onBlur` mode
See original GitHub issueDescribe the bug
I’m not sure if this is a bug. But while using onBlur
mode, errors don’t clear when a field is changed like they do while using onSubmit
mode.
To Reproduce Here is a recreation.
Expected behavior I expect the errors to be cleared when the corresponding field changes.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:20 (18 by maintainers)
Top Results From Across the Web
react-hook-form: Validation not working when using onBlur ...
In your code, the form mode is onBlur . it means the validation is triggered on blur event (unfocus the input). When you...
Read more >useForm - register - Simple React forms validation
Performant, flexible and extensible forms with easy-to-use validation.
Read more >react hook form onblur not working - You.com | The AI Search ...
In your code, the form mode is onBlur . it means the validation is triggered on blur event (unfocus the input). When you...
Read more >How to Use React-Hook-Form for Dead-Simple Forms - Medium
We can change this by passing useForm an object, where we can set the mode to when we want validation to be performed:...
Read more >API Documentation - Simple React forms validation
onChange, string, Validation will trigger on the change event with each input, ... This option allows you to configure when inputs with errors...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think @Tymek 's right - if you have an error and you correct it (regardless of mode), the error should clear on the change, so you know it happened… I’d like to hear a scenario where that would be unwanted.
you want to use mode:
onTouched
, reVliadateMode is for after submit