Free Trial Buy Now

Features - Validation

v
v
Bold (CTRL+B)
Italic (Ctrl+I)
Underline
Strikethrough
Align Left
Align Center
Align Right
Justify
Design
HTML
Preview
Built-in Validation:
Custom Validation:
The current length of HTML code representing the editor's content (in characters): 221
Submit

Description

The ASPxHtmlEditor provides a built-in means to perform powerful validation of its content, both on the client and server. Different validation settings are available for customization through the editor's SettingsValidation property.

To define editor validation logic, the following easy-to-use methods are provided (which can be combined together, if required):

  • The SettingsValidation.RequiredField property can be used to force an editor to require input, and give you the ability to display an error message if input is not received.
  • The editor's Validation event (client or server, or both) can be handled to setup custom editor validation. Review the code sample tabs within this demo, to learn how easy this really is.

Client validation of the ASPxHtmlEditor can be triggered automatically via a click on an ASPxButton, whose CausesValidation property is set to true. You can also manually initiate the editor's client validation by using the editor's Validate client method or specific static client methods (such as the ASPxClientEdit.ValidateEditorsInContainer, ASPxClientEdit.ValidateEditorsInContainerById, ASPxClientEdit.ValidateGroup).

The editor's server validation is always performed during processing of an external postback, if the editor's content has been changed. The server validation can also be initiated programmatically by using the editor's Validate server method, or a specific static server method ASPxEdit.ValidateEditorsInContainer.

Additionally, you are allowed to validate the editor's content programmatically (when required), and indicate the validation result manually, by either setting the editor's IsValid server property or using the SetIsValid client method.

When an editor fails validation logic, a specific error frame containing the error description can be displayed within the editor's View. The error frame's appearance is customized via the SettingsValidation.ErrorFrameStyle property. The error text can be specified by using the SettingsValidation.ErrorText property, in the Validation event's handler, or via the editor's ErrorText property (depending upon the validation method used).

This demo illustrates the built-in flexibility and efficiency of our validation engine, allowing you to easily implement different validation scenarios.

Version: v2012 vol 2.8
Experience the DevExpress Difference Today
Demos with source code are included with an installation of DevExpress controls for ASP.NET. Refer to the Demos and Sample Applications topic to learn more.
To download your free evaluation copy of our award-winning ASP.NET libraries, visit the Downloads page
All DevExpress ASP.NET Controls ship as part of DXperience ASP.NET, Enterprise, and Universal.
To obtain pricing information, visit the Pricing Options page or contact us via Email at info@devexpress.com
or by telephone at +1 (818) 844-3383 between 8:30am and 5pm Pacific Time.