Don't try to validate hidden fields

This commit is contained in:
Cássio Zen 2017-01-31 17:09:45 -02:00
parent 90365b711c
commit 507b4cb957

View File

@ -17,7 +17,10 @@ export default class ControlPane extends Component {
}
validate = () => {
this.props.fields.forEach(field => this.componentValidate[field.get("name")]());
this.props.fields.forEach((field) => {
if (isHidden(field)) return;
this.componentValidate[field.get("name")]();
});
};
controlFor(field) {