bar10der has asked for the wisdom of the Perl Monks concerning the following question:
HI All
I have a html form which has two date fields - datefrom & dateto. I am using CGI::Application::ValidateRM to validate form to make sure that users have entered dates. This is working fine.
Problem is I am not able to force user to enter datefrom < dateto, which is important. I can get around this by using sql and then reload the page all over again but I want to avoid it. Using Date::Calc->Delta_Days I am able to calculate total no of days, either +tive or -tive. However I am not able to fit this into profile of the page. At the moment my check_rm profile read like this
my ($results,$err_page) = $self->check_rm('holidayRequest',{ required => ['holidayfrom','holidayto'], optional => ['usercomments'], filters => ['trim'], msgs=>{ any_errors => 'err__', prefix=>'err_', }, }); return $err_page if $err_page;
Thanks in advance for your help
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dates and formvalidation
by larsen (Parson) on Feb 17, 2004 at 14:31 UTC | |
Re: Dates and formvalidation
by edan (Curate) on Feb 17, 2004 at 14:12 UTC | |
Re: Dates and formvalidation
by swiftone (Curate) on Feb 17, 2004 at 14:33 UTC | |
Re: Dates and formvalidation
by jdtoronto (Prior) on Feb 17, 2004 at 14:32 UTC | |
Re: Dates and formvalidation
by bar10der (Beadle) on Feb 19, 2004 at 11:48 UTC |
Back to
Seekers of Perl Wisdom