#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)
Change History (3)
Changed 14 years ago by
Attachment: | jquery.validate.hidden.patch added |
---|
comment:1 Changed 13 years ago by
Owner: | set to joern |
---|
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please file plugin bugs with the appropriate author on their bug tracker.
Patch to add validateHidden option