final-form / react-final-form

🏁 High performance subscription-based form state management for React
https://final-form.org/react
MIT License
7.39k stars 481 forks source link

Redux-form asyncBlurField equivalent in React-final-form #862

Open midhunpm opened 4 years ago

midhunpm commented 4 years ago

Anybody know how to run a validation rule on blur from a field. I have async request that checks for the availability of login id. Need to make this check when the user finish entering the loginid and blur out from the field. Right now, I pass the validate function to the Field and it's firing on each and every key stroke in the field. I want to do it only on blur from the field.

darioseidl commented 3 years ago

The Form has a validateOnBlur option that might do what you want: <Form validateOnBlur={true} ... />. There is an issue with this and submit though: https://github.com/final-form/final-form/issues/213