mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-20 09:11:40 +01:00
Core: Explicit default for focusCleanup option
Also removes unused blockFocusCleanup property check. Fixes #676
This commit is contained in:
@@ -229,6 +229,7 @@ $.extend( $.validator, {
|
||||
errorClass: "error",
|
||||
validClass: "valid",
|
||||
errorElement: "label",
|
||||
focusCleanup: false,
|
||||
focusInvalid: true,
|
||||
errorContainer: $( [] ),
|
||||
errorLabelContainer: $( [] ),
|
||||
@@ -238,8 +239,8 @@ $.extend( $.validator, {
|
||||
onfocusin: function( element ) {
|
||||
this.lastActive = element;
|
||||
|
||||
// hide error label and remove error class on focus if enabled
|
||||
if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
|
||||
// Hide error label and remove error class on focus if enabled
|
||||
if ( this.settings.focusCleanup ) {
|
||||
if ( this.settings.unhighlight ) {
|
||||
this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.validClass );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user