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

HtmlEditorValidationMessagePosition Enum

Lists validation message positions relative to the HTML Editor.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public enum HtmlEditorValidationMessagePosition

#Members

Name Description Image
Bottom

Bottom position.

HTML Editor - Bottom Validation Message Position

Top

Top position.

HTML Editor - Top Validation Message Position

Left

Left position.

HTML Editor - Left Validation Message Position

Right

Right position.

HTML Editor - Right Validation Message Position

#Related API Members

The following properties accept/return HtmlEditorValidationMessagePosition values:

#Remarks

Use the ValidationMessagePosition property to change the position of a validation message that the editor displays on invalid user input.

#Example

The following code snippet validates user input in the MarkupChanged event handler and configures validation settings as follows:

  • Displays a validation message if the editor’s markup is empty.
  • Sets the validation message text.
  • Positions the validation message at the right editor edge.

HTML Editor - Right Validation Message Position

Razor
<DxHtmlEditor Markup="@markup"
              IsValid="@isValid"
              ValidationMessage="Empty markup."
              ValidationMessagePosition="HtmlEditorValidationMessagePosition.Right"
              MarkupChanged="@OnMarkupChanged"
              Height="100px"
              Width="80%" />

@code {
    bool isValid;
    string markup { get; set; } = "";
    void OnMarkupChanged(string newValue) {
        markup = newValue;
        isValid = !string.IsNullOrEmpty(newValue);
    }
}
See Also