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

Commit afecd923 by superclarkk

Enable .validate(options.skip) to skip specific model/custom validators (feature request #4527)

1 parent abb9bd96
Showing with 5 additions and 5 deletions
......@@ -133,13 +133,13 @@ InstanceValidator.prototype._builtinValidators = function() {
* @private
*/
InstanceValidator.prototype._customValidators = function() {
var validators = [];
var self = this;
Utils._.each(this.modelInstance.$modelOptions.validate, function(validator,
validatorType) {
Utils._.each(this.modelInstance.$modelOptions.validate, function(validator, validatorType) {
if (self.options.skip.indexOf(validatorType) >= 0) {
return;
}
var valprom = self._invokeCustomValidator(validator, validatorType)
// errors are handled in settling, stub this
.catch(function() {});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!