Validating Common Form Input
Published on 25th of September 2008. Copyright Tavs Dokkedahl. Displayed 1189 time(s)One of the most frequent asked questions about JavaScript in various forums is how to perform input validation before submitting a form.
This tutorial will show how to validate the most common input fields like username, phonenumber and email.
First we will look at how form validation works in general and the subsequent parts will focus on the individual fields.
- Part 1 - How to add validation to a form
- Part 2 - Validating a username
- Part 3 - Validating names
- Part 4 - Validating phone numbers
- Part 5 - Validating passwords
- Part 6 - Validating website URLs
- Part 7 - Validating email adresses
- Part 8 - Table of regexes
