 | 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? |