It appears that you are confusing "display: none" with "type="hidden"
they are two totally different controls
if you have
<input id="Name1" type="text" class="reqired" value="" />
and you set it to "display: none" when the checkbox is checked... for
instance, saying $("#Name1").hide()
then the selector [...@type=hidden] won't find that because it is
still of type "text" (but just with it's display style set to "none")
On Dec 30, 2:26 am, nal <[email protected]> wrote:
> Hi,
> I have been using a prototype form
> validationhttp://tetlaw.id.au/view/javascript/really-easy-field-validation
>
> but I now wish to go to jquery.
>
> I can get it working but there is something i can't get to work and it
> was the best feature of the prototype script mentione above.
>
> I would like the validation script to exclude from the process any
> hidden form field.
>
> I set the validation rules as metatags with class="required"
>
> the following works but still requires to validate hidden fields
>
> $("#commentForm").validate();
>
> I have tried something like..
>
> $("#commentForm").validate({ignore: "[...@type=hidden]" });
>
> but that does not work
>
> Some fields are hidden because the parent div is set to display:none
> when a checkbox is checked.
>
> Any ideas?