On Fri, 3 Apr 2009 15:58:41 -0500
fREW Schmidt <[email protected]> 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
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################