RCS file: jquery.validate-1.2.1.js,v
retrieving revision 1.1
diff -u -r1.1 jquery.validate-1.2.1.js
|
|
|
407 | 407 | element = this.clean( element ); |
408 | 408 | this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass ); |
409 | 409 | var rules = jQuery(element).rules(); |
| 410 | var containsDependencyMismatch = false; |
410 | 411 | for( var i = 0; rules[i]; i++) { |
411 | 412 | var rule = rules[i]; |
412 | 413 | try { |
413 | 414 | var result = jQuery.validator.methods[rule.method].call( this, jQuery.trim(element.value), element, rule.parameters ); |
414 | | if ( result == "dependency-mismatch" ) |
415 | | return; |
| 415 | if ( result == "dependency-mismatch" ) { |
| 416 | containsDependencyMismatch = true; |
| 417 | } |
416 | 418 | if ( result == "pending" ) { |
417 | 419 | this.toHide = this.toHide.not( this.errorsFor(element) ); |
418 | 420 | return; |
… |
… |
|
427 | 429 | throw e; |
428 | 430 | } |
429 | 431 | } |
| 432 | if ( containsDependencyMismatch ) |
| 433 | return; |
430 | 434 | if ( rules.length ) |
431 | 435 | this.successList.push(element); |
432 | 436 | return true; |