logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

Catmandu::Validator::Mock - Validate items based on a flag

Configuration

       message
           Error message to return for rejected items.

       reject
           The validator marks all items as invalid as long as this flag is true. Default is false.

Description

       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.

Name

       Catmandu::Validator::Mock - Validate items based on a flag

See Also

       See Catmandu::Validator for inherited methods, common configuration options, and usage.

perl v5.40.0                                       2025-01-17                     Catmandu::Validator::Mock(3pm)

Synopsis

           use Catmandu::Validator::Mock;

           my $validator = Catmandu::Validator::Mock->new(
               message  => 'item is invalid',
               reject   => 1,
           );

See Also