In my (very limited) experience, field_filters don't really work that way. They're scoped to filter out within the validity checks that ValidateRM does and reverts back to the user's original input when the control comes back to you.
- Jason
Jeff MacDonald wrote:
HI,
I'm trying to use field_filters, to pull $'s out of fields for dollar amounts, as people inevitablly put that in..
It ain't doing it... here is my code..
if ($self->param('isLoggedIn')) { ($results,$err_page) = $self->check_rm('poolcheck::bookPool', { required => [qw/fullname address primary_phone workdate am_pm/], optional => [qw/secondary_phone email pooltype coveroff accessby public_comments workdate pending completed confirmed com bination prebooked blank1 blank1 invoicenum quoted/], constraints => {zipcode => 'zip', primary_phone => 'american_phone', secondary_phone => 'american_phone', email => 'email',
workdate => sub { # check to make sure workdate
doesn't precede today
my $val = shift;
my ($y,$m,$d) = split(/-/,$val);
my $pastdate = 0;
$pastdate = 1 if
(Delta_Days($y,$m,$d,Today()) <= 0);
return $pastdate; },
},
filters => ['trim'],
field_filters => { quoted => ['decimal'], },
msgs => {any_errors => 'err__',
prefix=>'err_'},
});
}
Any idea's or things i could try ?
Thanks.
--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
