Spry

Specify a minimum and maximum number of selections

By default, a Validation Checkbox widget is set to require a selection. If you insert a number of checkboxes on your page, however, you can specify a minimum and maximum selection range. For example, if you have six checkboxes within the span tag for a single Validation Checkbox widget, and you want to make sure that the user selects at least three checkboxes, you can set such a requirement for the entire widget.

 To specify a minimum or maximum number of selections, add the minSelections property or maxSelections property (or both) and a value to the constructor, as follows:
<script type="text/javascript">
	var cb1 = new Spry.Widget.ValidationCheckbox("checkboxwidget1",{minSelections:value, maxSelections:value});
</script>