Skip to content

Commit 3f5461c

Browse files
authored
fix(ObjectControl): hotfix nested object validation (#7385)
1 parent e216545 commit 3f5461c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/decap-cms-widget-object/src/ObjectControl.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ export default class ObjectControl extends React.Component {
7979
if (field.get('widget') === 'hidden') return;
8080
const name = field.get('name');
8181
const control = this.childRefs[name];
82-
control?.validate?.();
82+
83+
if (control?.innerWrappedControl?.validate) {
84+
control.innerWrappedControl.validate();
85+
} else {
86+
control?.validate?.();
87+
}
8388
});
8489
};
8590

0 commit comments

Comments
 (0)