Change Theme Settings
Change Theme Settings
Show All Themes

Inplace Validation


The DevExpress ASP.NET editors provide a powerful and seamless way to perform data validation on both the client and server.

Different validation settings can be customized for an editor using specific properties available via the ValidationSettings property of the editor.

Editor validation logic can be defined in the following ways (which can be combined, if required):

  • The ValidationSettings.RequiredField property can be used to force an editor to require input, and display an error message if input is not received.
  • The ValidationSettings.RegularExpression property is used to validate the value of an editor based on a regular expression.
  • An editor's Validation event can be handled on either the client or server (or both) to setup editor validation.

In this demo, the validation check is triggered by clicking the 'OK' ASPxButton control or by changing the editor's value (if the ValidationSettings.ValidateOnLeave option is enabled).

When an editor fails validation logic, the following can be displayed:

Input focus can be forced back to the editor's input region. The ValidationSettings.SetFocusOnError property controls the change in input focus.

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

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxEditorsDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxEditorsDemos