Skip to main content
Tab

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.v24.2.dll

Declaration

[DefaultValue("Invalid value")]
public virtual string ErrorText { get; set; }

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:

Object Type Path to ErrorText
ASPxEdit
.ValidationSettings .ErrorText
EditProperties
.ValidationSettings .ErrorText

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

View 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>
See Also