CGI Paramater Validation CPAN Modules 14 of 32 : [PREV] [NEXT]

Data::FormValidator

use Data::FormValidator;

my $results = Data::FormValidator->check($reference, \%profile);

$reference can either be a hash of data or an object reference, eg CGI, to something that can retrieve the data. We can then verify the results.

if ($results->has_invalid or $results->has_missing) {
# do something with $results->invalid, $results->missing
# or  $results->msgs
} else {
# do something with $results->valid
}

The %profile determines how the data is validated. So whats in the profile?


© 2003 Barbie barbie@missbarbell.co.uk Home http://birmingham.pm.org/