NAME
Validator::Custom::Trim - Triming based on Validator::Custom;
VERSION
Version 0.0101
SYNOPSIS
use Validator::Custom::Trim;
my $data = {
key1 => ' 123 ',
key2 => " \n a \r\n b\nc \t",
key3 => ' abc ',
key4 => ' def '
};
my $validators = [
key1 => [
['TRIM'] # ' 123 ' -> '123'
],
key2 => [
['TRIM_COLLAPSE'] # " \n a \r\n b\nc \t" -> 'a b c'
],
key3 => [
['TRIM_LEAD'] # ' abc ' -> 'abc '
],
key4 => [
['TRIM_TRAIL'] # ' def ' -> ' def'
]
];
my $vc_trim = Validator::Custom::Trim->new;
my $results = $vc_trim->validate($data, $validators)->results;
DESCRIPTION
This module usage is same as Validator::Custom.
See Validator::Custom document.
CONSTRAINTS
TRIM
Trim leading and trailing white space
TRIM_LEAD
Trim leading white space
TRIM_TRAIL
Trim trailing white space
TRIM_COLLAPSE
Trim leading and trailing white space, and collapse all whitespace characters into a single space.
AUTHOR
Yuki Kimoto, <kimoto.yuki at gmail.com>
BUGS
Please report any bugs or feature requests to bug-validator-custom-trim at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Validator-Custom-Trim. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Validator::Custom::Trim
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Validator-Custom-Trim
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
SEE ALSO
FormValidator::Simple,FormValidator::Simple::Plugin::Trim
Data::FormValidator, Data::FormValidator::Filters
COPYRIGHT & LICENSE
Copyright 2009 Yuki Kimoto, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.