Form validation helps us to ensure that users fill out forms in the correct format, making sure that submitted data will work successfully with our applications.This article will tell you what you need to know about form validation.When you construct an application that accesses data, you should assume all user input to be malicious until proven otherwise.Failure to do this can leave your application vulnerable to attack.
An important aspect of validation is understanding how it helps you increase the security for your Web site.
More and more browsers now support the constraint validation API, and it's becoming reliable.
This API consists of a set of methods and properties available on each form element.
One of the features of HTML5 is the ability to validate most user data without relying on scripts.
This is done by using validation attributes on form elements, which allow you to specify rules for a form input like whether a value needs to be filled in, the minimum and maximum length of the data, whether it needs to be a number, an email address, or something else, and a pattern that it must match.
(The default for this page, if implemented, would be e-mail confirmation.) By default, the Web Forms page automatically validates that malicious users are not attempting to send script to your application even if you do not use validation controls. For information about the difference between these Web project types, see text box can be converted to a date value. The first is the custom validation code that runs when the page is submitted.