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:
parent
86ea107550
commit
6fae8c7277
|
@ -641,13 +641,13 @@ function configure(cls, validation, args, opts) {
|
||||||
conf.customValidator = args.pop();
|
conf.customValidator = args.pop();
|
||||||
}
|
}
|
||||||
conf.validation = validation;
|
conf.validation = validation;
|
||||||
args.forEach(function (attr) {
|
var attr = args[0];
|
||||||
|
if (typeof attr === 'string') {
|
||||||
var validation = extend({}, conf);
|
var validation = extend({}, conf);
|
||||||
validation.options = opts || {};
|
validation.options = opts || {};
|
||||||
cls.validations[attr] = cls.validations[attr] || [];
|
cls.validations[attr] = cls.validations[attr] || [];
|
||||||
cls.validations[attr].push(validation);
|
cls.validations[attr].push(validation);
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Errors() {
|
function Errors() {
|
||||||
|
|
Loading…
Reference in New Issue