Bug Tracker

Modify

Ticket #3209 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

[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:
Blocking: Blocked by:

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

comment:1 Changed 6 years ago by joern

Fixed in 1.4.

comment:2 Changed 6 years ago by flesler

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

comment:3 Changed 6 years ago by joern

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

Duplicate of #2215, fixed. Please update.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.