Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.61 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.61 KB

In this project I have demonstrated form validations using just javascript, HTML, and CSS. Check out the live implementation here

What is form validation ?

Before submitting data to the server, you should check the data in the web browser to ensure that the submitted data is in the correct format.

To provide quick feedback, you can use JavaScript to validate data. This is called client-side validation.

If you don’t carry the client-side validation, it may cause a bad user experience. In this case, you may feel a noticeable delay because it takes time for the form data to transfer between the web browsers and the server.

Unlike the client-side validation that performs in the web browser, the server-side validation is performed on the server. It’s critical always to implement the server-side validation.

The reason is that client-side validation is quite easy to bypass. Malicious users can disable JavaScript and submit bad data to your server.

In this project, we’re going to focus on the client-side validation only.

Client-side validation options

When it comes to client-side validation, we have two options:

  • JavaScript validation: you develop the validation logic using JavaScript. Or you can use a library to do so.
  • Built-in form validation: you can use the HTML5 form validation features. This validation has a better performance than JavaScript validation. However, it isn’t as customizable as JavaScript validation, and does not work in Internet Explorer 9 or earlier.

Tech used :