NAME
Data::FormValidator::Filters - Basic set of filters available in an Data::FormValidator profile.
SYNOPSIS
use Data::FormValidator;
my $validator = new Data::FormValidator( "/home/user/input_profiles.pl" );
my $results = $validator->check( \%fdat, "customer_infos" );
DESCRIPTION
These are the builtin filters which may be specified as a name in the filters and field_filters parameters of the input profile. You may also call these functions directly through the procedural interface by either importing them directly or importing the whole :filters group. For example, if you want to access the trim function directly, you could either do:
use Data::FormValidator::Filters (qw/filter_trim/);
or
use Data::FormValidator::Filters (qw/:filters/);
$string = filter_trim($string);
Notice that when you call filters directly, you'll need to prefix the filter name with "filter_".
- trim
-
Remove white space at the front and end of the fields.
- strip
-
Runs of white space are replaced by a single space.
- digit
-
Remove non digits characters from the input.
- alphanum
-
Remove non alphanumerical characters from the input.
- integer
-
Extract from its input a valid integer number.
- pos_integer
-
Extract from its input a valid positive integer number.
- neg_integer
-
Extract from its input a valid negative integer number.
- decimal
-
Extract from its input a valid decimal number.
- pos_decimal
-
Extract from its input a valid positive decimal number.
- neg_decimal
-
Extract from its input a valid negative decimal number.
- dollars
-
Extract from its input a valid number to express dollars like currency.
- phone
-
Filters out characters which aren't valid for an phone number. (Only accept digits [0-9], space, comma, minus, parenthesis, period and pound [#].)
- sql_wildcard
-
Transforms shell glob wildcard (*) to the SQL like wildcard (%).
- quotemeta
-
Calls the quotemeta (quote non alphanumeric character) builtin on its input.
- lc
-
Calls the lc (convert to lowercase) builtin on its input.
- uc
-
Calls the uc (convert to uppercase) builtin on its input.
- ucfirst
-
Calls the ucfirst (Uppercase first letter) builtin on its input.
SEE ALSO
- o
-
L<Data::FormValidator>
- o
-
L<Data::FormValidator::Constraints>
- o
-
L<Data::FormValidator::Filters::Image> - shrink incoming image uploads
AUTHOR
Author: Francis J. Lacoste <francis.lacoste@iNsu.COM>
Maintainer: Mark Stosberg <mark@summersault.com>
COPYRIGHT
Copyright (c) 1999,2000 iNsu Innovations Inc. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms as perl itself.