If this feature  exists now, tell me please. If not, just a feature
request!
What's my plan ?

<div id="err_group_id1">invalid error place holder</div>
<ul><li><input type="checkbox" name="g1[]" id="" value="" /></li>
<li><input type="checkbox" name="g1[]" id="" value="" /></li>
<li><input type="checkbox" name="g1[]" id="" value="" /></li>
<li><input type="checkbox" name="g1[]" id="" value="" /></li>
</ul>

<ul><li><input type="checkbox" name="g2[]" id="" value="" /></li>
<li><input type="checkbox" name="g2[]" id="" value="" /></li>
<li><input type="checkbox" name="g2[]" id="" value="" /></li>
<li><input type="checkbox" name="g2[]" id="" value="" /></li>
</ul>

<script type="text/javascript">//<![CDATA[
$("#myform").validate({
  groups: {
    err_group_id1: "g1[] g2[]"
  },
  errorPlacement: function(error, element) {
     if (element.group_key)
       error.appendTo('#' + element.group_key);
     else
       error.insertAfter(element);
   }
 })
//]]></script>

Reply via email to