Data::Validation::Filters - Filter data values
use Data::Validation::Filters; %config = ( method => $method, %{ $self->filters->{ $id } || {} } ); $filter_ref = Data::Validation::Filters->new_from_method( %config ); $value = $filter_ref->filter_value( $value );
Applies a single filter to a data value and returns it's possibly changed value
Defines the following attributes:
method
Name of the constraint to apply. Required
pattern
Used by "isMathchingRegex" as the pattern to match the supplied value against
replace
The replacement value used in regular expression search and replace operations
A class method which implements a factory pattern using the method attribute to select the subclass
Calls either a builtin method or an external one to filter the data value
Replaces &<>" with their &xxx; equivalents
Lower cases the data value
Removes all non numeric characters
Matches the regular expression pattern and substitutes the replace string
Remove all leading and trailing whitespace
Upper cases the data value
Removes all whitespace
Returns undef if value is zero length
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Validation. Patches are welcome
Larry Wall - For the Perl programming language
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2015 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install Data::Validation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Validation
CPAN shell
perl -MCPAN -e shell install Data::Validation
For more information on module installation, please visit the detailed CPAN module installation guide.