Back to Devexpress

DxEditorBase.ShowValidationSuccessState Property

blazor-devexpress-dot-blazor-dot-base-dot-dxeditorbase-817893e3.md

latest3.4 KB
Original Source

DxEditorBase.ShowValidationSuccessState Property

Specifies whether the editor indicates successful validation. When an input value is valid, the editor displays a green outline and can show a success icon.

Namespace : DevExpress.Blazor.Base

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(null)]
[Parameter]
public bool? ShowValidationSuccessState { get; set; }

Property Value

TypeDefaultDescription
Nullable<Boolean>null

true to display green outlines; otherwise, false.
null to inherit the value from the GlobalOptions.ShowValidationSuccessState property.

|

Remarks

DevExpress input editors support data validation. You can add editors to Blazor’s standard EditForm. This form validates user input based on data annotation attributes defined in a model.

Data editors can display validation icons and colored outlines based on validation results. Editor with default settings display red outlines and shows an error icon when validation fails, but do not indicate successful validation.

You can use the following properties to change how editors indicate their validation status:

ShowValidationIconUse the ShowValidationIcon global option or an editor’s ShowValidationIcon property to specify whether an editor shows a validation icon: or .ShowValidationSuccessStateUse the ShowValidationSuccessState global option or an editor’s ShowValidationSuccessState property to specify whether an editor indicates successful validation. It displays a green outline and can show a success icon (if the ShowValidationIcon is set to true).

For additional information, refer to Display Validation Results.

razor
<EditForm Model="@model">
    <DataAnnotationsValidator />
    @*...*@
    <DxDropDownBox ...
                    ShowValidationSuccessState="true" >
        <DropDownBodyTemplate Context="ddbBodyContext">
            <Editors_DropDownBox_SearchLookup_Grid DropDownBox="@ddbBodyContext.DropDownBox" />
        </DropDownBodyTemplate>
    </DxDropDownBox>
    @*...*@
</EditForm>

Implements

ShowValidationSuccessState

See Also

DxEditorBase Class

DxEditorBase Members

DevExpress.Blazor.Base Namespace