What are Validation Controls?
Validation Controls validate the user input data to ensure that only correct authenticated data gets stored.
ASP.NET validation controls validate the user input data to ensure that useless, unauthenticated, or contradictory data don't get stored.
Validation Controls List
i) Required Field Validator: This is an elementary validation control. Almost all forms include a few fields that must be filled out by the user in order to continue. To ensure that these fields are not left empty, the Required Field Validator is used.
ii) RangeValidator: Simply, the RangeValidator control defines the range that the input value may fall. This is mainly beneficial for date or numeral input values such as age.
The RangeValidator control verifies that the input value falls within a predetermined range. It has three specific properties:
iii) CompareValidator: The CompareValidator control compares the value of one control with either a fixed value or a value in another control.
iv) RegularExpressionValidator: RegularExpressions, also known as Regex, are patterns that specify how text should be formatted. Regex returns true if the text is in the same format, else it returns false.
The RegularExpressionValidator enables the validation of input text by comparing it to a regular expression's pattern. And the ValidationExpression property contains the regular expression.
v) CustomValidator: The CustomValidator is used to write your own validation. And the validation can be done either on the client side or the server side.
vi) ValidationSummary: It doesn't perform any validation. The purpose of ValidationSummary is to display a summary of all the errors on the page.