Back to Devexpress

ValidationSettings.ErrorTextPosition Property

aspnet-devexpress-dot-web-dot-validationsettings-a614c520.md

latest3.4 KB
Original Source

ValidationSettings.ErrorTextPosition Property

Gets or sets the error text’s position within the error frame relative to the validated control.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(ErrorTextPosition.Right)]
public ErrorTextPosition ErrorTextPosition { get; set; }
vb
<DefaultValue(ErrorTextPosition.Right)>
Public Property ErrorTextPosition As ErrorTextPosition

Property Value

TypeDefaultDescription
ErrorTextPositionRight

One of the ErrorTextPositionenumeration values.

|

Available values:

NameDescription
Top

An error text is displayed at the top of the validated control.

| | Right |

An error text is displayed at the right of the validated control.

| | Bottom |

An error text is displayed at the bottom of the validated control.

| | Left |

An error text is displayed at the left of the validated control.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ErrorTextPosition
ASPxEdit

.ValidationSettings .ErrorTextPosition

| | EditProperties |

.ValidationSettings .ErrorTextPosition

|

Example

aspx
<dx:ASPxTextBox ID="tbEMail" runat="server" Size="49" NullText="Enter e-mail ..." Font-Size="Small">
    <ValidationSettings EnableCustomValidation="True" ErrorDisplayMode="Text" ErrorTextPosition="Bottom" SetFocusOnError="true">
        <ErrorFrameStyle Font-Size="Smaller"/>
        <RegularExpression ValidationExpression="^\w+([-+.'%]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" 
            ErrorText="Invalid e-mail"/>
        <RequiredField IsRequired="True" ErrorText="E-mail is required"/>
    </ValidationSettings>
    <NullTextStyle Font-Size="Small"/>
</dx:ASPxTextBox>
aspx
<dx:ASPxTextBox ID="tbEMail" runat="server" Size="49" NullText="Enter e-mail ..." Font-Size="Small">
    <ValidationSettings EnableCustomValidation="True" ErrorDisplayMode="Text" ErrorTextPosition="Bottom" SetFocusOnError="true">
        <ErrorFrameStyle Font-Size="Smaller"/>
        <RegularExpression ValidationExpression="^\w+([-+.'%]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" 
            ErrorText="Invalid e-mail"/>
        <RequiredField IsRequired="True" ErrorText="E-mail is required"/>
    </ValidationSettings>
    <NullTextStyle Font-Size="Small"/>
</dx:ASPxTextBox>

See Also

Validation

ValidationSettings Class

ValidationSettings Members

DevExpress.Web Namespace