Validation groups allow you to organize validation controls on a page as a set.
Each validation group can perform validation independently from other validation
groups on the page. You create a validation group by setting the ValidationGroup
property to the same name (a string) for all the controls you want to group. You
can assign any name to a validation group, but you must use the same name for all
members of the group.
There are two validation groups in this example:
- The "SearchFormValidationGroup" contains a RadTextBox and a
RadComboBox which are validated by two RequiredFieldValidator
controls. The ValidationGroup property of the validators and the
"Search" button is set to SearchFormValidationGroup. Pressing the "Search"
button will trigger validation only for the SearchFormValidationGroup.
- The "LoginFormValidationGroup" contains two RadTextBox controls
which are validated by two RequiredFieldValidator controls. The
ValidationGroup property of the validators and the "Login" button
is set to LoginFormValidationGroup. Pressing the "Login" button will trigger
validation only for the LoginFormValidationGroup.