ValidationSettings.ErrorText Property
Gets or sets the error text to be displayed within the editor’s error frame if the editor’s validation fails.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v20.2.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | "Invalid value" | A String value that specifies the error text. |
Property Paths
You can access this nested property as listed below:
Remarks
The ErrorText property allows you to specify the default error text to be displayed if the editor’s validation fails. If any specific validation type is used (such as the required field or regular expression validation) or a validation event is handled, the ErrorText property’s value can be overridden. To learn more, see the Validation Error Message topic.
Example
<dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="200px" View="GroupBox" HeaderText="ValidationGroup = 'MyGroup'">
<PanelCollection>
<dx:PanelContent ID="PanelContent1" runat="server">
<dx:ASPxTextBox ID="tbTextBox3" runat="server" Width="170px" Style="margin-bottom: 4px;">
<ValidationSettings ValidationGroup="MyGroup" ErrorText="Field is required." validateonleave="False">
<RequiredField IsRequired="True" ErrorText="" />
</ValidationSettings>
</dx:ASPxTextBox>
<dx:ASPxTextBox ID="tbTextBox4" runat="server" Width="170px">
<ValidationSettings ValidationGroup="MyGroup" ErrorText="Field is required." validateonleave="False">
<RequiredField IsRequired="True" ErrorText="" />
</ValidationSettings>
</dx:ASPxTextBox>
<br />
<input type="button" value="Validate Group" onclick="ASPxClientEdit.ValidateGroup('MyGroup');" />
</dx:PanelContent>
</PanelCollection>
<HeaderStyle Font-Size="9pt" />
</dx:ASPxRoundPanel>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ErrorText property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.