HTML Editor - Features Validation

  • v
  • v
  • Bold (Ctrl+B)
  • Italic (Ctrl+I)
  • Underline
  • Strikethrough
  • Align Left (Ctrl+L)
  • Align Center (Ctrl+E)
  • Align Right (Ctrl+R)
  • Justify (Ctrl+J)
Length of HTML code representing the Editor's content (in characters): 221


This demo illustrates the content validation capabilities available to you within the DevExpress MVC HTML Editor. You can define Editor content validation logic - both on the client and server - using the following methods:

  • Check if content is empty. Apply the Required attribute to the model property containing the HTML content to force the editor to require input and display a prompt message when validation fails.
  • Provide validation settings by applying the HtmlSettings attribute to the model property containing the HTML content. Validation settings are specified as parameters of this attribute. For example, the AllowScripts parameter allows you to specify whether or not to accept HTML markup containing scripts.
  • Provide custom validation logic on the server side by assigning a custom delegate to the HtmlEditorBinderSettings.ValidationHandler property.
  • Provide custom validation logic on the client side by handling the Editor’s Validation client event or passing the delegate method as a parameter to the extension's GetHtml function, called within the Validation action.

You are free to combine these methods together to augment validation rules when required.

Version: v2017 vol 1.6
Copyright © 2006-2017 Developer Express Inc
Your Next Great MVC App Starts Here

Get started today and download your 30-day trial of DevExpress MVC Extensions (includes 30 days of free technical support).

All demos ship with full source code and are included in the DevExpress MVC distribution. Refer to the Demos and Sample Applications topic to learn more.

DevExpress MVC Extensions ship as part of DevExpress Universal, DXperience and ASP.NET Subscriptions and are backed by a 60 day unconditional money-back guarantee.
To learn more and obtain pricing information, visit the Compare Features and Pricing webpage. For immediate assistance, contact us by Email at or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.