JavaScript - Single Field Validation

JavaScript provides an easy way to validate single fields on an HTML form. The Guest Book done earlier in this course is an example of using JavaScripts.

JavaScript provides an easy way to do the following types of validation:

ADVANTAGES:

DISADVANTAGES:

See the following examples to see how this works.

JAVAScript Example 1 Demonstrates checking for required and optional fields, min and max lengths, and a special character check.
JAVAScript Example 2 Demonstrates alpha character checks and numeric checks.

Previous Module Return to Project Main Page Next Module