aspnet-devexpress-dot-web-dot-validationsettings-cfe4fa2d.md
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.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue("Invalid value")]
public virtual string ErrorText { get; set; }
<DefaultValue("Invalid value")>
Public Overridable Property ErrorText As String
| Type | Default | Description |
|---|---|---|
| String | "Invalid value" |
A String value that specifies the error text.
|
You can access this nested property as listed below:
| Object Type | Path to ErrorText |
|---|---|
| ASPxEdit |
.ValidationSettings .ErrorText
| | EditProperties |
.ValidationSettings .ErrorText
|
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.
<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>
<input type="button" value="Validate Group" onclick="ASPxClientEdit.ValidateGroup('MyGroup');" />
</dx:PanelContent>
</PanelCollection>
<HeaderStyle Font-Size="9pt" />
</dx:ASPxRoundPanel>
<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>
<input type="button" value="Validate Group" onclick="ASPxClientEdit.ValidateGroup('MyGroup');" />
</dx:PanelContent>
</PanelCollection>
<HeaderStyle Font-Size="9pt" />
</dx:ASPxRoundPanel>
See Also