It means checking user input for validity, or in short, checking user input for the input that is actually required or checking user input for improper values.
Normally in ASP.Net we may have 2 kinds of validations:
There are 6 validation controls provided by ASP.Net; they are:
Every Validation Control has some common properties; they are:
Let's discuss about each and every control in depth.
Note: The Range Validator throws an exception if the values specified by MinimumValue and MaximumValue cannot be converted to the type provided by the Type Property.
Note:RangeValidator,CompareValidator, RegularExpressionValidator will not validate for empty values..
Note:ErrorMessage property of validation control is used by ValidationSummary and the text is just displayed in place where validation control is placed (if validation fails).
In server side we have Page.Validate() and in ClientSide we have the Page_ClientValidate() function.(Both of them have overloads accepting validation group).
In server side we can simply do this by using the Enabled Property.And in client side we have ValidatorEnable function which accepts two parameters Valdation control and Boolean value indicating enable/disable.