Remove iteration of config args

Fixes #154 - args should only contain the property name at that point,
not loop over it.
This commit is contained in:
Fabien Franzen 2014-08-26 18:01:23 +02:00
parent 86ea107550
commit 6fae8c7277
1 changed files with 3 additions and 3 deletions

View File

@ -641,13 +641,13 @@ function configure(cls, validation, args, opts) {
conf.customValidator = args.pop();
}
conf.validation = validation;
args.forEach(function (attr) {
var attr = args[0];
if (typeof attr === 'string') {
var validation = extend({}, conf);
validation.options = opts || {};
cls.validations[attr] = cls.validations[attr] || [];
cls.validations[attr].push(validation);
});
}
}
function Errors() {