Skip to content

Commit b881329

Browse files
author
tom bertrand
committed
Fixed error where radio or checkbox input errors wouldnt clear on change
1 parent 572ddb6 commit b881329

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jquery.validation.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,13 @@
861861
var event = "coucou" + resetSuffix;
862862
if (options.submit.settings.clear) {
863863
event += " " + options.submit.settings.clear + resetSuffix;
864+
if (~['radio', 'checkbox'].indexOf(input[0].type)) {
865+
event += " change" + resetSuffix;
866+
}
864867
}
865868
if (options.dynamic.settings.trigger) {
866869
event += " " + options.dynamic.settings.trigger + resetSuffix;
867-
if (options.dynamic.settings.trigger !== "focusout") {
870+
if (options.dynamic.settings.trigger !== "focusout" && !~['radio', 'checkbox'].indexOf(input[0].type)) {
868871
event += " change" + resetSuffix + " paste" + resetSuffix;
869872
}
870873
}

0 commit comments

Comments
 (0)