http://qs321.pair.com?node_id=383270


in reply to How do I write a CGI script with form validation?

The difference between Perl newbie and making a living is realising that there is no good reason to be trying to program a form validator. This is a problem that has long-since been solved.

CGI::Application::ValidateRM is an easy to use software library that marries the structure enforcement of CGI::Application with the pre-built form validation capabilities of Data::FormValidator in a useful and stylish way.

While it may not be immediately obvious how to set this solution up, the time you invest in finding out will likely be more profitable to you than trying to work out a comparable solution yourself. It will also teach you more about building software. You can bring specific problems back here for expert advice.

Personally, I stick a bit of Javascript validation on my forms in addition to this since it can save the end user a page refresh but that's a matter of personal taste.

MB