Skip to content

Commit

Permalink
Revert "fix: show the default validation message when there is a requ…
Browse files Browse the repository at this point in the history
…ired error (#386)"

This reverts commit ac301f8.
  • Loading branch information
aesopwolf committed Jan 24, 2017
1 parent 57f97cb commit f1ba9d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module.exports = {
return this.state._isRequired;
},
showError: function () {
return this.showRequired() && !this.isValid();
return !this.showRequired() && !this.isValid();
},
isValidValue: function (value) {
return this.context.formsy.isValidValue.call(null, this, value);
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Formsy.Form = React.createClass({
}

if (isRequired) {
var error = validationErrors[requiredResults.success[0]] || validationError;
var error = validationErrors[requiredResults.success[0]];
return error ? [error] : null;
}

Expand Down

0 comments on commit f1ba9d4

Please sign in to comment.