Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13839 closed bug (notabug)

jQuery group-validation not working correctly (Focus)

Reported by: p.sander@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

I'm grouping to textfields into one validation group, but when trying this i noticed that their websites example is not working correctly.

in this flow the validation message disappears:

without changing the textfield values ("Pete", empty) click on submit. the cursor automatically focuses the second field. focus the first textfield click surounding area to lose focus.

in this flow the validation message is shown:

focus first field focus second field click surounding area to lose focus.

i would not expect this behavior.

Code from the official jQuery site http://docs.jquery.com/Plugins/Validation/validate#toptions (groups -section)

$("#myform").validate({

groups: {

username: "fname lname"

}, errorPlacement: function(error, element) {

if (element.attr("name") == "fname"

element.attr("name") == "lname" )

error.insertAfter("#lastname");

else

error.insertAfter(element);

}, debug:true

})

Change History (1)

comment:1 Changed 6 years ago by timmywil

Resolution: notabug
Status: newclosed

Unfortunately, we are unable to assist with issues related to support or third party plugins. Support can be found on the forums or on the #jquery irc channel. Issues with the validate plugin can be filed here.

Note: See TracTickets for help on using tickets.