final-form / final-form/react-final-form
Fire field-level async validation only if sync validation is passing
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
Feature request
### What is the current behavior?
Currently, we have no easy way to control whether to fire **field-level** async validation only after sync validation is passing.
There is a workaround if we are dealing the record-level validations, for example in the [Hybrid Synchronous/Asynchronous Record-Level Validation](https://codesandbox.io/s/kl9n295n5) example provided in docs. But in this example, if we are modifying the password field, the username async validation fires.
### What is the expected behavior?
Is there an easy way to fire async validation for a specific field only if this field is passing sync validation? This is fairly simple using `redux-form`.
Maybe I'm missing something in the `final-form` docs.
Contributor guide
Assessment
This issue has not been assessed yet.