note
larsen
I'm working on similar problems with [cpan://Data::FormValidator]. I see it's not [cpan://CGI::Application::ValidateRM], but given the relationship between these two modules, maybe the following example will give you some benefit (in other words: everything I'm going to say is supposed to be useful under the hypothesis that CGI::A::VRM's interface is similar to D::FV's one):
<code>
# ... This is part of the validator profile ...
constraints => {
...
holidayto => {
params => [ qw/ holidayfrom holidayto / ]
constraint => sub {
my $from = shift;
my $to = shift;
# Perform some check with Date::Calc...
}
} ,
...
}
</code>
Note that you can supply an anonymous sub, and a list of parameters that will be passed to the subroutine itself.
329592
329592