Catmandu::Validator::Mock
Validate items based on a flag
- Provided by: libcatmandu-perl (Version: 1.1000-2)
- Report a bug
Validate items based on a flag
use Catmandu::Validator::Mock;
my $validator = Catmandu::Validator::Mock->new(
message => 'item is invalid',
reject => 1,
);
This Catmandu::Validator can be used for testing as it does not actually look at the data to validate. Instead it rejects items if "reject" is set to a true value.
See Catmandu::Validator for inherited methods, common configuration options, and usage.