Skip to main content

ASPxHtmlEditor.Validation Event

Allows you to specify whether the ASPxHtmlEditor’s content is valid.

Namespace: DevExpress.Web.ASPxHtmlEditor

Assembly: DevExpress.Web.ASPxHtmlEditor.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public event EventHandler<HtmlEditorValidationEventArgs> Validation

Event Data

The Validation event's data class is HtmlEditorValidationEventArgs. The following properties provide information specific to this event:

Property Description
ErrorText Gets or sets the error description.
Html Gets or sets the HTML markup specifying the ASPxHtmlEditor’s content.
IsValid Gets a value specifying whether the validation has been completed successfully.

Remarks

The Validation event is raised when it is required to validate the ASPxHtmlEditor’s value.

Handle the Validation event to test the ASPxHtmlEditor’s content against custom validation criteria. If the content, obtained via the HtmlEditorValidationEventArgs.Html property, doesn’t meet your restrictions, you can provide text explaining why the validation has failed, by assigning a descriptive text to the HtmlEditorValidationEventArgs.ErrorText property and by setting the event parameter’s HtmlEditorValidationEventArgs.IsValid property to false. In this case, the specified text will be displayed within a specific message box.

See Also