[cgiapp] Re: Confused with ValidateRM
Mark Stosberg
mark at summersault.com
Mon Apr 6 11:34:58 EDT 2009
On Fri, 3 Apr 2009 15:58:41 -0500
fREW Schmidt <frioux at gmail.com> wrote:
> How can I get ValidateRM to recognize something like
> field_filters => {
> foo => 'checkbox'
> }
Given your code, I would just do this:
use Data::FormValidator::Filters::Checkbox 'checkbox_filter';
And then:
field_filters => {
foo => checkbox_filter(),
}
But since your closure takes no args, you could also do this:
field_filters => {
foo => \&__checkbox
}
(But you would want to rename __checkbox and make sure it is exported).
The old style like below involves more black magic and is not recommended for new filters.
field_filters => {
foo => 'my_filter',
}
Mark
More information about the cgiapp
mailing list