You might also look into
Data::FormValidator, which helps with input validation and error display. It works with custom regular expressions. You might also look at
Regexp::Common as a starting point for solid RE's, which you can use with Data::FormValidator if you'd like. If you are using CGI::Application, which I recommend, you use
CGI::Application::ValidateRM to reasily reload the form with errors. Otherwise, you may still want to look into
HTML::FillInForm.
Mark