title: unobtrusive MVC3 validating group of checkboxes
body: <p>I need to validate a group of checkboxes using MVC3 unobtrusive validation. how would i do it? I found this and tried it, but it doesn't work. </p>
  
  <pre><code>$(function(){
  
          $.validator.addMethod('cb_selectone', function(value,element){
              if(element.length&gt;0){
                  for(var i=0;i&lt;element.length;i++){
                      if($(element[i]).val('checked')) return true;
                  }
                  return false;
              }
              return false;
          }, 'Please select at least one option');
  
          $('#main').validate({rules:{Services:"cb_selectone"}});
  </code></pre>
  
  <p>...</p>
  
  <p>My Html:</p>
  
  <pre><code>&lt;input type="checkbox" class="checkbox" name="Services" value="1" /&gt;
  &lt;input type="checkbox" class="checkbox" name="Services" value="2" /&gt;
  &lt;input type="checkbox" class="checkbox" name="Services" value="3" /&gt;
  </code></pre>
  
  <p>It would be best if someone provided a complete solution with server side + client side validation (of course using MVC3 unobtrusive validation). </p>
  
  <p>Thanks</p>