Skip to content

Commit

Permalink
fix [#52]
Browse files Browse the repository at this point in the history
enum 模式中value值可以为0、false等
  • Loading branch information
jruif committed Jun 27, 2017
1 parent 3bb6943 commit ff1310b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/validator/enum.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ function enumerable(rule, value, callback, source, options) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value) {
rules[ENUM](rule, value, source, errors, options);
}
rules[ENUM](rule, value, source, errors, options);
}
callback(errors);
}
Expand Down

0 comments on commit ff1310b

Please sign in to comment.