Name

Data::Validation::Filters - Filter data values

Version

0.9.$Revision: 160 $

Synopsis

use Data::Validation::Filters;

%config = ( method => $method,
            exception => q(Exception::Class),
            %{ $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 Data::Validation::Utils Moose::Role. 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

Data::Validation::Utils
Moose

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) 2012 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