Below is a form that uses the basic checkbox widget. This widget will check to ensure at least one chechbox is checked. Click on the submit button without checking a leisure activity to see the error message (by default the checkbox widget will not validate the checkbox form control until after the user clicks on the submit button).
Below is a form that uses a checkbox widget that will validate if the user has selected at least one checkbox, but no more than 3 checkboxes. The widget will do the validation each time the user makes a change in the checkbox part of the form.
Below is a form that uses a checkbox widget that will validate if the user checks 0-2 checkboxes (the user is not required to select a checkbox). The widget will do the validation each time the user makes a change in the checkbox part of the form.