Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxDataEditor<T>.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

C#
[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.

Razor
<EditForm Model="@model">
    <DataAnnotationsValidator />
    @*...*@
    <DxTextBox ...
           ShowValidationSuccessState="true"/>
    @*...*@
</EditForm>
See Also