[jQuery] Validation Plugin Beta 2 Bug - Radio Buttons

[jQuery] Validation Plugin Beta 2 Bug - Radio Buttons

Dan,
That fixed it. Now everything is working as expected. Thanks for the help.
Ryan Rose
Vice President
Digiwize, Inc.
One Technology Drive
Tolland, CT 06084
e: ryan@digiwize.com
p: 860.730.2631
http://www.digiwize.com
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of dswitzer@pengoworks.com
Sent: Tuesday, March 20, 2007 11:27 AM
To: 'jQuery Discussion.'
Subject: Re: [jQuery] Validation Plugin Beta 2 Bug - Radio Buttons
Ryan,
You can fix this bug by changing lines 637-638 in the jquery.validate.js to:
            if( /radio|checkbox/i.test(element.type) )
                return jQuery(element.form ||
document).find('[@name=\"' + element.name + '\"]:checked').length;
The problem is the CSS selector needs quotes around the value of the name
attribute in order to find the array syntax field names.
The change should probably be made to the forId() method (lines 250-252) as
well just to be safe:
    forId: function( id ) {
        return this.filter( '[@for="' + id + '"]' );
    }
-Dan