HTML and CSS Reference
client side. When a user fills out a form and presses the submit button, the form is sent
to a server, and then often to a server script such as PHP, ASP.NET or a JavaServlet for
further processing. Although forms can be validated by a server program, it is more effi-
cient to take care of the validation before sending the script to the server. This is an
if all the boxes have been filled out correctly, and if not, the user is told to reenter the
data before the form is submitted to the server. Checking the form on the client side
allows for instant feedback, and less traveling back and forth between the browser and
server. It might be that the server-side program does its own validation anyway, but if
With the power provided by regular expressions, the ability to check for any type of
input, such as e-mail addresses, passwords, Social Security numbers, and birthdates is
greatly simplified. This chapter will teach you how regular expressions and their
metacharacters are used so that you will be able to read expressions even as complicated
as the one shown in Figure 17.1. There are a number of regular expression validators
Figure 17.1 A regular expression library. The user types “email” in the Search box.
See Figure 17.2 for results.