From the course: HTML & CSS: Creating Forms

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Form validation

Form validation - HTML Tutorial

From the course: HTML & CSS: Creating Forms

Start my 1-month free trial

Form validation

- [Presenter] The goal of validation is to make sure users are entering the data you want. For example the correct number of digits in a zip code, and also to make sure they aren't sending malicious data. Validation just means you're telling them that they make a mistake after the user entered the data. There are different ways to provide validation, which can be roughly divided into three categories. We have client-side validation, which is done in the browser when the form is submitted. And this what we see an examples of with the built in browser validation. Client-side validation can can also be done inline. And this is when you get a validation message as the user is filling out the form before they click submit. Server-side validation is done after the form is submitted when the server sends back an error message. So the advantage of doing validation on the client-side, that is by the browser, is that it's a lot faster than waiting for the server to send back a response. The…

Contents