It works great. Thanks for the help. This is a much cleaner solution than my
original. Awesome plugin.

Ryan Rose
Vice President
Digiwize, Inc.
One Technology Drive
Tolland, CT 06084
e: [EMAIL PROTECTED]
p: 860.730.2631
http://www.digiwize.com


-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: Wednesday, May 23, 2007 4:53 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Validation Plugin validates hidden form fields


Ryan Rose wrote:
>
> Jörn,
>
> How can I force the new validation plugin to ignore form elements with 
> display: none?
>
>  
>
> I modified the previous release this way:
>
> validator.elements = 
> this.find(":input:not(:submit):not(:reset):visible").focus(function() {
>
> validator.lastActive = this;
>
> });
>
Try this, less obtrusive:

var validator = $("#myform").validate();
validator.elements = validator.elements.filter(":visible");

No need to modify the plugin file itself. Please let me know if that 
works for you.

-- 
Jörn Zaefferer

http://bassistance.de


Reply via email to