From 507b4cb957fd4a211aa03bbc87d17906a7f48e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Zen?= Date: Tue, 31 Jan 2017 17:09:45 -0200 Subject: [PATCH] Don't try to validate hidden fields --- src/components/ControlPanel/ControlPane.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ControlPanel/ControlPane.js b/src/components/ControlPanel/ControlPane.js index 93a3ce98..31ab81b6 100644 --- a/src/components/ControlPanel/ControlPane.js +++ b/src/components/ControlPanel/ControlPane.js @@ -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) {