Spry Checkbox Validation Samples

This page gives examples of the Spry checkbox validation widget capabilities.

This is an example of a checkbox validation widget. There are three validation techniques: validation can occur as you go (Change), when the text field loses focus (Blur) or when the form is submitted (Submit). The Submit validation occurs always, regardless of the other options chosen.

Change - Submit

Please make a selection.

Blur - Submit

Please make a selection.


Please make a selection.

The widget can also be applied on a group of checkboxes, to ensure that a minimum and/or maximum selections have been made. This sample forces the user to select at least two checkboxes, but no more than five.


Please make a selection. Minimum number of selections not met. Maximum number of selections exceeded. 

This is an example showing how to style the error messages, using a css class similar to the one from the SpryValidationCheckbox.css file.

You cannot submit the form until you accept the terms of the licence agreement!

You can change the widget container to use the checkbox label, and not to use any error messages.