From the course: Building Great Forms with HTML and CSS

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Client-side form validation

Client-side form validation

- [Instructor] Before submitting data to the server, it's important to ensure all required form controls are filled out in the correct format. This is called client-side form validation and it helps ensure data submitted matches the requirements set forth in the various form controls. Client-side validation is an initial check and an important feature of good user experience. By catching invalid data on the client's side, the user can fix it straight away. If it gets to the server and is then rejected, a delay is caused by a round trip to the server and then back to the client side to tell the user how to fix the data. They may or may not be there at that point, so this doesn't make for great user experience. Many websites with registration forms provide feedback when you don't enter your data in the format that they are expecting. You'll get a message such as, the field is required, you can't leave this field blank,…

Contents