THEMES
THEME SETTINGS

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

Submit

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 - via any of the following methods:

  • Check if content is empty. Enable the SettingsValidation.RequiredField property to force the editor to require input and display a prompt message when validation fails.
  • Provide custom validation logic 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. Open the Code tab within this demo to see how this is accomplished.

You are free to combine these methods together to augment validation rules when required. Additional validation options can be specified via the Editor's SettingsValidation property. Among others, there are options for an error frame, which is displayed within the editor's Design View when the Editor fails validation. These options allow you to specify both error description and appearance settings. In addition, you can dynamically customize error descriptions within validation event handlers.

Version: v2016 vol 2.4
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 info@devexpress.com or by phone at +1 (818) 844-3383 between 7:30am and 4:30pm Pacific Time.