ASPxValidationSummary.ValidationGroup Property
Gets or sets the name of group of controls whose errors after validation should be displayed within the ASPxValidationSummary.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | A string value that specifies the validation group’s name. |
Remarks
Validation groups allow you to assign the ASPxValidationSummary to the validation controls on a page (the ASPxValidationSummary‘s ValidationGroup property should be the same named with the control’s ValidationGroup property).
When you specify a value for the ValidationGroup property, only the errors after validation of the corresponding controls on the form ares displayed within the ASPxValidationSummary.
Example
The following example demonstrates how to use the ASPxValidationSummary‘s ASPxValidationSummary.ValidationGroup
property.
<dx:ASPxTextBox ID="tbEmail" runat="server" Width="200px">
<ValidationSettings ValidationGroup="TestGroup">
<RequiredField IsRequired="True" ErrorText="E-mail is required" />
<RegularExpression ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
ErrorText="Invalid e-mail" />
</ValidationSettings>
</dx:ASPxTextBox>
<dx:ASPxValidationSummary ID="vsValidationSummary1" runat="server"
RenderMode="OrderedList" Width="243px" Paddings-PaddingLeft="14px"
HeaderText="Errors Summary:" ShowErrorsInEditors="True"
ValidationGroup="TestGroup">
<Paddings PaddingLeft="14px"></Paddings>
</dx:ASPxValidationSummary>