The following two mutually inclusive properties list out the error message: Complex pages have different groups of information provided in different panels.

validating custom control attributes-40

The validation control classes are inherited from the Base Validator class hence they inherit its properties and methods.

Therefore, it would help to take a look at the properties and the methods of this base class, which are common for all the validation controls: The Regular Expression Validator allows validating the input text by matching against a pattern of a regular expression.

This kind of situation is handled using validation groups.

To create a validation group, you should put the input controls and the validation controls into the same logical group by setting their Validation Group property.

The client side validation is accomplished through the Client Validation Function property.

The client side validation routine should be written in a scripting language, such as Java Script or VBScript, which the browser can understand.

The regular expression is set in the Validation Expression property.

The following table summarizes the commonly used syntax constructs for regular expressions: The Custom Validator control allows writing application specific custom validation routines for both the client side and the server side validation.

This post shows you how to create your own custom validation attributes in MVC.