Skip to content

Commit

Permalink
Don't try to validate hidden fields
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiozen committed Jan 31, 2017
1 parent 90365b7 commit 507b4cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ControlPanel/ControlPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 507b4cb

Please sign in to comment.