Skip to content

Commit

Permalink
Fixed showLabel() removing all classes from error element. Remove onl…
Browse files Browse the repository at this point in the history
…y settings.validClass. Fixes jquery-validation#151.
  • Loading branch information
simshaun authored and jzaefferer committed Jul 28, 2011
1 parent dd23b0b commit 0baa8ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Fixed issue #127 - Finnish translations has one : instead of ;
* Fixed Russian localization, minor syntax issue
* Added in support for HTML 5 input types, fixes #97
* Fixed showLabel() removing all classes from error element. Remove only settings.validClass. Fixes #151.

1.8.1
---
Expand Down
2 changes: 1 addition & 1 deletion jquery.validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ $.extend($.validator, {
var label = this.errorsFor( element );
if ( label.length ) {
// refresh error/success class
label.removeClass().addClass( this.settings.errorClass );
label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );

// check if we have a generated label, replace the message then
label.attr("generated") && label.html(message);
Expand Down

0 comments on commit 0baa8ac

Please sign in to comment.