1. Home
  2. Computing & Technology
  3. JavaScript

Guide's Form Validation Scripts

A collection of functions that you can use to build up the validations that you require for your forms.
Text Field Validation
You will probably need to write at least some of the Javascript code to validate the text fields on your forms for yourself. To make the job easier, this collection of functions perform a lot of the validations that you will need to incorporated.
Validate and Format Date
A little different from the other form validation functions because this one works while your visitor is entering the date validating it and formatting it as they type rather than waiting until they finish.
Credit Card Validation
If you have a field for credit card number on your form then this script can provide basic field validation for you.
Date Validation
Dates can be entered in a lot of different formats. This ready to use script can recognise many of the formats that dates can be entered in. It can also validate that the date entered is not in the future or not in the past (whichever is appropriate for your requirements).
Email Address Validation
If you have a field for email address on your form then this script can provide the necessary field validation for you.

Explore JavaScript

More from About.com

  1. Home
  2. Computing & Technology
  3. JavaScript
  4. Script Library
  5. Form Validation Scripts

©2008 About.com, a part of The New York Times Company.

All rights reserved.