Skip to content

Commit 0baa8ac

Browse files
simshaunjzaefferer
authored andcommitted
Fixed showLabel() removing all classes from error element. Remove only settings.validClass. Fixes jquery-validation#151.
1 parent dd23b0b commit 0baa8ac

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Fixed issue #127 - Finnish translations has one : instead of ;
66
* Fixed Russian localization, minor syntax issue
77
* Added in support for HTML 5 input types, fixes #97
8+
* Fixed showLabel() removing all classes from error element. Remove only settings.validClass. Fixes #151.
89

910
1.8.1
1011
---

jquery.validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ $.extend($.validator, {
633633
var label = this.errorsFor( element );
634634
if ( label.length ) {
635635
// refresh error/success class
636-
label.removeClass().addClass( this.settings.errorClass );
636+
label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
637637

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

0 commit comments

Comments
 (0)