jquery validate check at least one checkbox

Posted by Omu on Stack Overflow See other posts from Stack Overflow or by Omu
Published on 2010-06-14T07:38:16Z Indexed on 2010/06/14 7:52 UTC
Read the original article Hit count: 278

Filed under:
|

I have something like this:

<form>
<input id='roles' name='roles' type='checkbox' value='1' />
<input id='roles' name='roles' type='checkbox' value='2' />
<input id='roles' name='roles' type='checkbox' value='3' />
<input id='roles' name='roles' type='checkbox' value='4' />
<input id='roles' name='roles' type='checkbox' value='5' />
<input type='submit' value='submit' />
<form>

I would like to validate that at least one checkbox (roles) should be checked, is it possible with jquery.validate ?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-validate