Peter Flanigan > Data-Validation-0.15.1 > Data::Validation::Filters

Download:
data-validation/Data-Validation-0.15.1.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: v0.15.1   Source  

Name ^

Data::Validation::Filters - Filter data values

Version ^

Describes version v0.15.$Rev: 1 $ of Data::Validation::Filters

Synopsis ^

   use Data::Validation::Filters;

   %config = ( method => $method, %{ $self->filters->{ $id } || {} } );

   $filter_ref = Data::Validation::Filters->new( %config );

   $value = $filter_ref->filter( $value );

Description ^

Applies a single filter to a data value and returns it's possibly changed value

Configuration and Environment ^

Uses the Moo::Role Data::Validation::Utils. Defines the following attributes:

replace

The replacement value used in regular expression search and replace operations

Subroutines/Methods ^

filter

Calls either a builtin method or an external one to filter the data value

_filter

Should have been overridden in an external filter subclass

filterEscapeHTML

Replaces &<>" with their &xxx; equivalents

filterLowerCase

Lower cases the data value

filterNonNumeric

Removes all non numeric characters

filterReplaceRegex

Matches the regular expression pattern and substitutes the replace string

filterTrimBoth

Remove all leading and trailing whitespace

filterUpperCase

Upper cases the data value

filterWhiteSpace

Removes all whitespace

filterZeroLength

Returns undef if value is zero length

Diagnostics ^

None

Dependencies ^

Moo
Unexpected::Types

Incompatibilities ^

There are no known incompatibilities in this module

Bugs and Limitations ^

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author ^

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright ^

Copyright (c) 2013 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

syntax highlighting: