Back to Devexpress

ValidationSettings.ErrorFrameStyle Property

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

latest3.2 KB
Original Source

ValidationSettings.ErrorFrameStyle Property

Gets the style properties for the editor’s error frame.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public ErrorFrameStyle ErrorFrameStyle { get; }
vb
Public ReadOnly Property ErrorFrameStyle As ErrorFrameStyle

Property Value

TypeDescription
ErrorFrameStyle

An ErrorFrameStyle object that contains style settings.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ErrorFrameStyle
ASPxEdit

.ValidationSettings .ErrorFrameStyle

| | EditProperties |

.ValidationSettings .ErrorFrameStyle

|

Remarks

Use the ErrorFrameStyle property to define the appearance of the editor’s error frame. The error frame is displayed if the editor’s value has not passed validation criteria specified.

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 Error Message

Validation

ValidationSettings Class

ValidationSettings Members

DevExpress.Web Namespace