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

Commit cfd4da82 by Mick Hansen

Merge pull request #4528 from superclarkk/patch-1

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