Skip to main content

Bug Tracker

Side navigation

#4293 closed bug (invalid)

Opened March 04, 2009 10:55PM UTC

Closed February 05, 2010 08:36PM UTC

Last modified March 15, 2012 01:52PM UTC

[validate] unhighlight callback unnecessary execution for checkbox fields

Reported by: supjogi Owned by: joern
Priority: minor Milestone: 1.4
Component: plugin Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

There is problem when you have registered unhighlight callback and validate checkbox fields.

For example for below code when you click "Check" it show error and add error class in highligh function, but when you click on "Blue" checkbox - error class is removed (unhighlight is executed) but error still exists.




highlight: function(element){



unhighlight: function(element){



errorPlacement: function(error, element){



rules: {

color: {

required: true,

minlength: 2



messages: {

color: {

required: "Please select at least two colors"







.myerror {

color: red;



<form id="colorForm">




<input type="checkbox" name="color" value="1"/>Black <input type="checkbox" name="color" value="2"/> White <input type="checkbox" name="color" value="3"/> Blue<input type="submit" value="Check"/>








I have modify function in this plugin to look like below, because there are problem that validated field exists also in validElements and invalidElements because "not" function compare checkbox array with single checkbox and they aren't equal.

validElements: function() {

var that = this;



return that.findByName([0]



Attachments (0)
Change History (2)

Changed October 13, 2009 12:22AM UTC by dmethvin comment:1

owner: → joern

Changed February 05, 2010 08:36PM UTC by john comment:2

resolution: → invalid
status: newclosed

Please file plugin bugs with the appropriate author on their bug tracker.