### Spry Radio Validation Samples

This page gives examples of the Spry Radio Validation widget capabilities.

This is an example of a radio 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
Check me!
Or me!
Please make a selection.
Blur - Submit
Check me!
Or me!
Please make a selection.
Submit
Check me!
Or me!
Please make a selection.

The widget can be applied on a group of radios. You can have in your group of radios an non-empty default value that you don't want to be submitted or define an invalid value. This sample forces the user to select a radio different than the default 'None' value and the 'invalid'.

Categories:

None | INVALID | Sports
Health | Finance | Travel
Music | Technology | Publishing
Please make a selection. Please choose a valid value.

The error messages can be located in a different HTML element in page.

Change - Submit
Check me!
Not me!
Please make a selection. Please choose a valid value.
Errors
Please make a selection. Please choose a valid value.

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

Software License Agreement NOTICE TO USER: PLEASE READ THIS AGREEMENT CAREFULLY. BY COPYING, INSTALLING OR USING ALL OR ANY PORTION OF THE SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT, INCLUDING, IN PARTICULAR THE LIMITATIONS ON: USE CONTAINED IN SECTION 2; TRANSFERABILITY IN SECTION 4; WARRANTY IN SECTIONS 6 AND 7; LIABILITY IN SECTION 8; AND SPECIFIC PROVISIONS AND EXCEPTIONS IN SECTION 14. YOU AGREE THAT THIS AGREEMENT IS LIKE ANY WRITTEN NEGOTIATED AGREEMENT SIGNED BY YOU. THIS AGREEMENT IS ENFORCEABLE AGAINST YOU AND ANY LEGAL ENTITY THAT OBTAINED THE SOFTWARE AND ON WHOSE BEHALF IT IS USED: FOR EXAMPLE, IF APPLICABLE, YOUR EMPLOYER. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT USE THE SOFTWARE. VISIT http://www.mysite.com FOR TERMS OF AND LIMITATIONS ON RETURNING THE SOFTWARE FOR A REFUND Do you accept the terms and conditions stated above?
I decline I accept You cannot submit the form until you accept the terms of the licence agreement!

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

Software License Agreement NOTICE TO USER: PLEASE READ THIS AGREEMENT CAREFULLY. BY COPYING, INSTALLING OR USING ALL OR ANY PORTION OF THE SOFTWARE YOU ACCEPT ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT, INCLUDING, IN PARTICULAR THE LIMITATIONS ON: USE CONTAINED IN SECTION 2; TRANSFERABILITY IN SECTION 4; WARRANTY IN SECTIONS 6 AND 7; LIABILITY IN SECTION 8; AND SPECIFIC PROVISIONS AND EXCEPTIONS IN SECTION 14. YOU AGREE THAT THIS AGREEMENT IS LIKE ANY WRITTEN NEGOTIATED AGREEMENT SIGNED BY YOU. THIS AGREEMENT IS ENFORCEABLE AGAINST YOU AND ANY LEGAL ENTITY THAT OBTAINED THE SOFTWARE AND ON WHOSE BEHALF IT IS USED: FOR EXAMPLE, IF APPLICABLE, YOUR EMPLOYER. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT USE THE SOFTWARE. VISIT http://www.mysite.com FOR TERMS OF AND LIMITATIONS ON RETURNING THE SOFTWARE FOR A REFUND Do you accept the terms and conditions stated above?
None I accept I decline