This may be over-kill for this problem, but there is a great CPAN module called HTML::FormValidator
It allows some amazing CGI form validation, with predefined built-in data types, or the ability for you to register your own validation routines.
A great thing about this library, is that you can predefine and reuse validation "objects" if you wish. Once you define an Order object, for example, you save the definition in a perl script. Then when you the HTML::FormValidator->new() constructor, you can pass the location of this pre-defined object. In theory, you'd never need to write the same validation routines for a given object type again.
And best of all it encourages aggregation of all your validation code into libraries, for better code reuse
In reply to Re: Form Verification
by dkubb
in thread Form Verification
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |