Data::Verifier::Results - Results of a Data::Verifier
use Data::Verifier; my $dv = Data::Verifier->new(profile => { name => { required => 1, type => 'Str', filters => [ qw(collapse trim) ] } age => { type => 'Int'; }, sign => { required => 1, type => 'Str' } }); my $results = $dv->verify({ name => 'Cory', age => 'foobar' }); $results->success; # no $results->is_invalid('name'); # no $results->is_invalid('age'); # yes $results->is_missing('name'); # no $results->is_missing('sign'); # yes
Returns true or false based on if the verification's success.
Returns the value for the specified field. The value may be different from the one originally supplied due to filtering or coercion.
Returns true if the specific field is invalid.
Returns a list of invalid field names.
Returns the count of invalid fields in this result.
Returns true if the specified field is missing.
Returns a list of missing field names.
Returns the count of missing fields in this result.
Cory G Watson, <gphat at cpan.org>
<gphat at cpan.org>
Copyright 2009 Cold Hard Code, LLC
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Data::Verifier, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Verifier
CPAN shell
perl -MCPAN -e shell install Data::Verifier
For more information on module installation, please visit the detailed CPAN module installation guide.