Redux-form async validation returning undefined for fields in asyncBlurFields

Viewed 770

My code is similar to this example presented in the doc. However, I've noticed that the asyncValidate function receives undefined for any field specified in the asyncBlurFields array as soon as I unFocus from that field. However, it returns the right values when I submit the form or unFocus from a different field.

For example, if I have asyncBlurFields: ['username', 'firstname'] and there's a value in both fields, I'll see username as undefined in the values passed to asyncValidatewhen I unFocus from username but the value of firstname will be present. If I then unFocus from firstname, the value of firstname will now be undefined while that of username will be present. Both values will be present when I submit the form. It seems similar to the question raised in issue #1834. However, I don't understand the response given in that issue. Could someone please help me with an example or further explanation.

I'm using version 7.0.1 of redux-form and version 0.45.1 of react-native.

1 Answers
Related