From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more
FormValidator::Lite::Constraint::Date - date constraints
This module provides date constraints.
$validator = FormValidator::Lite->new(CGI->new("date=2009-09-02"));$validator->check( date => ['DATE']);# or$validator = FormValidator::Lite->new(CGI->new("y=2009&m=09&d=02"));$validator->check( {date => [qw/y m d/]} => ['DATE']);
$validator
= FormValidator::Lite->new(CGI->new(
"date=2009-09-02"
));
->check(
date
=> [
'DATE'
]
);
# or
"y=2009&m=09&d=02"
{
qw/y m d/
]} => [
This constraints checks the parameter is valid date or not.
To install FormValidator::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FormValidator::Lite
CPAN shell
perl -MCPAN -e shell install FormValidator::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.