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
In reply to Dates and formvalidation by bar10der
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |