NAME

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

SYNOPSIS

package Local::Test::User;

use Moo;
use Valiant::Filters;

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