Bug Tracker

Opened 11 years ago

Closed 10 years ago

Last modified 8 years ago

#3394 closed bug (invalid)

[validate] Validation plugin validates hidden inputs

Reported by: elyobo Owned by: joern
Priority: minor Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: validate Cc:
Blocked by: Blocking:

Description

The validate plugin validates hidden inputs, if they are of an appropriate class (e.g. 'required'). This can be confusing, especially if the error message is also hidden (e.g. where the input is wrapped inside a hidden div).

Preventing the validate plugin from paying attention to any hidden inputs (by checking if they, or any parents, are hidden) is simple, but the ideal behaviour would be for this to be configurable (as I suppose that some people want to validate hidden inputs as well).

The attached patch adds the validateHidden option, defaulting to true (the current behaviour). If this is set to false, a check is made on each element and all of their ancestors before validating; if any is hidden, validation is skipped for that element.

Liam O'Boyle http://www.ontheroad.net.nz

Attachments (1)

jquery.validate.hidden.patch (782 bytes) - added by elyobo 11 years ago.
Patch to add validateHidden option

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by elyobo

Patch to add validateHidden option

comment:1 Changed 10 years ago by dmethvin

Owner: set to joern

comment:2 Changed 10 years ago by john

Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.