More Forms Validation

This script is more powerful than the one on the previous page (and is much longer as well). It can be used to check form input not only for all required fields being completed, but can also make certain that fields requiring number (integer) or date input have been filled in correctly.

The demonstration form below, when submitted, will take you to a page containing instructions on how to use the script, so I suggest you save the source code now. If you wish, you can reach the instructions page by clicking on the 'Next Page' button above, instead.

First Name: (required validation)
Last Name: (required validation)
Address 1: (required validation)
Address 2: (no validation)
What is your age: (required and integer validation)
Years have you been scripting: (required and integer validation)
Insert the date: (mm/dd/yy) (required and date validation)