From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

Valiant::Validator::With - Validate using a coderef or method

SYNOPSIS

use Moo;
has 'name' => (is=>'ro', required=>1);
filters name => (
trim => 1;
);
my $user = Local::Test::User->new(name=>' john ');
print $user->name; # 'john'

DESCRIPTION

Trims whitespace from the start and end of a string value.

SEE ALSO

Valiant, Valiant::Filter, Valiant::Filter::Each.

AUTHOR

See Valiant

COPYRIGHT & LICENSE

See Valiant