There is another way too. You can simply quote your class names like this:

"department.code":{required:true}

Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Sat, Jan 10, 2009 at 7:10 PM, Jörn Zaefferer
<joern.zaeffe...@googlemail.com> wrote:
> Absolutely! Documented here:
> http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29
>
> Jörn
>
> On Sat, Jan 10, 2009 at 8:33 AM, Kashif <kashif.razza...@gmail.com> wrote:
>>
>> This is a very useful plugin that I use for all my projects.
>> Unfortunately, I cannot use it with any of my Java Struts2 projects
>> because I need to assign the name attributes of my input fields with
>> periods in them.
>> for example
>> <input type="text" name="department.code" value="" id="setup-
>> department-save_department_code"/>
>>
>> Validate rules for this dont work, underneath is an example.
>>
>>        $("#setup-department-save")
>>            .validate(
>>                        {
>>                            rules:
>>                            {
>>                                department.code:{required:true}
>>                            }
>>                        }
>>                    );
>>
>>
>> Is there some way I can still use this plugin?
>> Thanks
>>
>

Reply via email to