Types of validation controls provided by ASP.NET

VALIDATION CONTROLS:-

 ASP.NET Provide six types of validation controls which are as under:-

1. Compare Validator: It checks that the value in controls should match some specific value.

For Example - Textbox
TxtPie should be equal to 3.14.

2. Custom Validator: It is used to define UserDefined validation i.e checks the user's entry using validation logic that we write ourself. This type of validation enables us to check for values derived at run time.

3. RangeValidator: It checks if the value in validated control is in that specific range.

For Example - TxtCustomerCode should not be more than eight length.

4. RequiredFieldValidator: It ensures that the user does not skip an entry i.e it checks whether the control have any value. It is used when we want the control should not be empty.

5. RegularExpressionValidator: It checks that the entry matches a pattern defined by a regular expression. This type of validation enables us to check for predictable sequences of characters, such as those in e-mail addresses, telephone numbers, postal codes, and so on.  

6. ValidationSummaryControl: As the name explains it displays the summary of all current validation errors. It is often used in conjunction with other validation controls to display the error messages from all the validation controls on the page together.