hi i am using jquery validation plugin . i can set rules to my fields by there name
example
<input type="text" id="name" name="name">
and set rules
rules: {
name: {
required:true,
minlength: 3,
maxlength: 250
}
}
but i have a checkbox group like this
<input id="cooking-facilities" type="checkbox" name="additional[]" value="cooking-facilities" tabindex="123456789">
the name is additional[] here .
but when i try to use like
rules: {
additional[]: {
required:true
}
}
it gives errors . how can i set rules in jquery validation plugin to my check-box group
i am using
http://docs.jquery.com/Plugins/Validation
please help………………………………
You did not read the docs?
http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29