Valiant::Validator::With - Validate using a coderef or method
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'
Trims whitespace from the start and end of a string value.
Valiant, Valiant::Filter, Valiant::Filter::Each.
See Valiant
To install Valiant, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Valiant
CPAN shell
perl -MCPAN -e shell install Valiant
For more information on module installation, please visit the detailed CPAN module installation guide.