Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Dates and formvalidation

by larsen (Parson)
on Feb 17, 2004 at 14:31 UTC ( #329600=note: print w/ replies, xml ) Need Help??


in reply to Dates and formvalidation

I'm working on similar problems with Data::FormValidator. I see it's not 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):

# ... 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... } } , ... }
Note that you can supply an anonymous sub, and a list of parameters that will be passed to the subroutine itself.


Comment on Re: Dates and formvalidation
Download Code
Re: Re: Dates and formvalidation
by NodeReaper (Curate) on Feb 19, 2004 at 11:46 UTC

    Reason: valdez delete, it's empty

    For more information on this node visit: this

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://329600]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2015-07-05 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls