Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 805b083

Browse files
committed
Fix async validators capturing and overwriting validation results
1 parent 85f60e8 commit 805b083

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/control-component-factory.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ function createControlClass(s) {
329329

330330
mapValues(asyncValidators, (validator, key) => {
331331
const outerDone = (valid) => {
332-
const validity = i.merge(fieldValue.validity, { [key]: valid });
332+
// get current fieldValue as another validator may have already been processed.
333+
const currentFieldValue = this.props.fieldValue;
334+
const validity = i.merge(currentFieldValue.validity, { [key]: valid });
333335

334336
dispatch(actions.setValidity(model, validity));
335337
};

0 commit comments

Comments
 (0)