不要怂,就是干,撸起袖子干!

Commit b826165d by Jan Aagaard Meier

Check for an empty validation error message. Closes #2009

1 parent fddf0250
Showing with 1 additions and 1 deletions
...@@ -329,7 +329,7 @@ InstanceValidator.prototype._invokeBuiltinValidator = Promise.method(function(va ...@@ -329,7 +329,7 @@ InstanceValidator.prototype._invokeBuiltinValidator = Promise.method(function(va
// extract extra arguments for the validator // extract extra arguments for the validator
var validatorArgs = test.hasOwnProperty('args') ? test.args : test; var validatorArgs = test.hasOwnProperty('args') ? test.args : test;
// extract the error msg // extract the error msg
var errorMessage = test.hasOwnProperty('msg') ? test.msg : var errorMessage = test.hasOwnProperty('msg') && test.msg ? test.msg :
'Validation ' + validatorType + ' failed'; 'Validation ' + validatorType + ' failed';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!