NAME
Valiant::Filter::Collapse - collapse whitespace
SYNOPSIS
package
Local::Test::User;
use
Moo;
use
Valiant::Filters;
has
'name'
=> (
is
=>
'ro'
,
required
=>1);
filters
name
=> (
collapse
=> 1,
);
my
$user
= Local::Test::User->new(
name
=>
'john james napiorkowski'
);
$user
->name;
# 'john james napiorkowski'
DESCRIPTION
Given a string collapse all whitespace to a space 'space'. This will not remove whitespace at the start/end of a string, merely collapse it to a single space ( see Valiant::Filter::Trim) =head1 SEE ALSO
Valiant, Valiant::Filter, Valiant::Validator::Filter.
AUTHOR
See Valiant
COPYRIGHT & LICENSE
See Valiant