Bug Tracker

Opened 8 years ago

Closed 7 years ago

#3209 closed bug (fixed)

[validate] unhighlightfunction is different from version 1.2.1

Reported by: 11mb Owned by: joern
Priority: major Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: unhighlight Cc:
Blocked by: Blocking:

Description

Hi,

I often use these sort of code:

var validater = $("#quickscan").validate({

rules: {

vraag1: {

required: true

}, vraag2: {

required: true

}, vraag3: {

required: true

}, vraag4: {

required: true

}, vraag5: {

required: true

}, vraag6: {

required: true

}, vraag7: {

required: true

}, vraag8: {

required: true

}, vraag9: {

required: true

}

}, messages: {

vraag1: {

required: "verplicht"

}, vraag2: {

required: "verplicht"

}, vraag3: {

required: "verplicht"

}, vraag4: {

required: "verplicht"

}, vraag5: {

required: "verplicht"

}, vraag6: {

required: "verplicht"

}, vraag7: {

required: "verplicht"

}, vraag8: {

required: "verplicht"

}, vraag9: {

required: "verplicht"

}},

highlight: function( element, errorClass ) { jQuery( element ).parent().parent().addClass( errorClass ); }, unhighlight: function( element, errorClass ) { jQuery( element ).parent().parent().removeClass( errorClass ); }

});

The unhighlight in version 1.3 works not as expected. While I expect that he only removes the errorclass of the field that is not giving an error anymore, he removes all error classes of the whole form. The exacly same code with Version 1.2.1 works perfect.

Eventually i can provide a test document.

Change History (3)

comment:1 Changed 8 years ago by joern

Fixed in 1.4.

comment:2 Changed 8 years ago by flesler

  • Component changed from core to plugin
  • Owner set to joern

comment:3 Changed 7 years ago by joern

  • Resolution set to fixed
  • Status changed from new to closed

Duplicate of #2215, fixed. Please update.

Note: See TracTickets for help on using tickets.