Skip to main content
All docs
V24.2

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

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Default Description
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 Error when validation fails, but do not indicate successful validation.

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

ShowValidationIcon
Use the ShowValidationIcon global option or an editor’s ShowValidationIcon property to specify whether an editor shows a validation icon: Success or Error.
ShowValidationSuccessState
Use 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 Success (if the ShowValidationIcon is set to true).

For more information, refer to Display Validation Results.

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