XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Your validation tests look reasonable. One optimisation would be to use an array for the error messages, like so:
...which means you don't need to maintain a flag. Looking on CPAN, I see CGI::Validate which appears to a a Getopt style validator and Params::Validate which may be useful. Update:Podmaster suggested Data::FormValidator, which is what I was trying to find. Update2: I left the & in there because that's what the supplicant had - now removed. For reasons why not to do this, see perlsub. Basically, with the &, the argument list to a sub is optional and you will get the @_ array visible at the time of calling in the subroutine. In reply to Re: Validating incoming CGI form data
by zakb
|
|