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

Commit 9a75a5db by Caleb Bauermeister

Added condition to arg passer for validators.

1 parent 5132e4d2
Showing with 1 additions and 1 deletions
...@@ -261,7 +261,7 @@ InstanceValidator.prototype._invokeBuiltinValidator = Promise.method(function(va ...@@ -261,7 +261,7 @@ InstanceValidator.prototype._invokeBuiltinValidator = Promise.method(function(va
if (!Array.isArray(validatorArgs)) { if (!Array.isArray(validatorArgs)) {
if (validatorType === 'isImmutable') { if (validatorType === 'isImmutable') {
validatorArgs = [validatorArgs, field]; validatorArgs = [validatorArgs, field];
} else if (validatorType === 'isIP') { } else if (validatorType === 'isIP' || validatorType === 'isAlpha' || validatorType === 'isAlphanumeric') {
validatorArgs = []; validatorArgs = [];
} else { } else {
validatorArgs = [validatorArgs]; validatorArgs = [validatorArgs];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!