March 18, 2006

March 06 Meeting - Form validation

Continuing from last month's presentation on referencing form fields, we talked today about how to validate a form for required fields, empty fields, non-numeric fields, and how the different types of fields (select, check and radio) are validated differently.

The first step to form validation is intercepting the submit event of the form and creating the necessary wrapper function to execute your validation code. Forms can get extensive, so it is always a good idea to build your script as you build your form. Later on we will continue with this topic when we discuss regular expressions.