final-form / final-form/react-final-form
Trigger validation on both onChange and onBlur
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### **Feature request**
### What is the current behavior?
If `true`, validation will happen on blur. If `false`, validation will happen on change. Defaults to `false`.
### What is the expected behavior?
I would suggest adding another config option;
`validateOnChange: bool`
`validateOnBlur: bool`
### Other information
I'm considering abandoning my own attempt at a form library (it was a great learning experience though), since you certainly know more about the different pain points users have, and the internal workings of React and how to properly do performant libraries, considering your background with forms and React.
One thing I really liked with my solution was the ability to do sync validation onChange, and async (i.e network requests) on onBlur.
I haven't figured out another way to do this just yet. But If we can have the library to validate on both onChange and onBlur this would be possible.
Contributor guide
Assessment
This issue has not been assessed yet.