Did a workaround that I should have thought of before :), using the provided
submitHandler function.

For those looking for a similar solution, here it is :

$("#Form").validate({
    submitHandler: function(form) {

        $(".multi").each(function(i){

            var val = $(this).attr("name");
            $(this).attr("name", val+"[]");
                   }

        );

        $(form).submit();
    }
});

Cheers
Alexander

------
portalZINE®- innovation uncovered
http://www.portalzine.de
 
dev. portalZINE® - all about development
http://dev.portalzine.de
 
pro. portalZINE® - customized experience
http://pro.portalzine.de
-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alexander Graef
Sent: Thursday, October 11, 2007 7:52 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: validation plugin: validation of checkboxes fail


Hi,
thanks :) How would I reference the name for the rule and message
preferences ?

Using test[] would break the javascript, can I use 'test[]' as the key
value? 

Will give it a try.

Cheers
Alexander  
-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: Thursday, October 11, 2007 6:26 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: validation plugin: validation of checkboxes fail


Alexander Graef schrieb:
> Hi,
>
> For the multi select:
> <select name="test[]" multiple="multiple">
>       <option value="one">one</option>
>       <option value="two">two</option>
>       <option value="three">three</option>
>       <option value="four">four</option>
>       <option value="five">five</option>
> </select>
>
> This allows you to pass the selected items via a form post and receive
them
> as an array.
>
> Same applies for the checkboxes:
>
> Steak:<input type="checkbox" value="Steak" name="food[]">
> Pizza:<input type="checkbox" value="Pizza" name="food[]">
> Chicken:<input type="checkbox" value="Chicken" name="food[]">
>   
If your serverside prefers that format, thats the way to go. The 1.1 
release may have a problem with those, until 1.2, please give the latest 
revision a try: http://dev.jquery.com/view/trunk/plugins/validate/

Regards
Jörn


__________ NOD32 2586 (20071011) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




__________ NOD32 2586 (20071011) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


Reply via email to