How can I require that fields be filled in, or filled in correctly?
Here is the answer,
Have the server-side (e.g., CGI) program that processes the form submission send an error message if the field is not filled in properly. Ideally, this error message should include a copy of the original form with the original (incomplete or incorrect) data filled in as the default values for the form fields. The Perl CGI.pm module provides helpful mechanisms for returning partially completed forms to the user.
Note that the server-side program should not rely upon the checking done by the client-side script.