in reply to How do I validate DATE as a single field with FormValidator::Simple?
I only find how to validate it as 3 distinct fields:
Then you stopped reading the documentation before you found the answer to your question
datetime => [ [ 'DATETIME_STRPTIME', '%Y-%m-%dT%T%z' ] ], datetime => [ [qw/DATETIME_FORMAT MySQL/] ],
Making an intuitive leap, I guess that this might also work
update: after testing, it doesn't :) oh well,perl -MFormValidator::Simple -MCGI -le " my $q = CGI->new({qw/ snot 20 +11-08-11 /}); my $result = FormValidator::Simple->check( $q => [ { no +se => [qw/ snot /] } => [ q/DATE/ ], ] ); warn $result->has_error; "
perl -MFormValidator::Simple -MCGI -le " my $q = CGI->new({qw/ snot 2 +011-08-11 /}); my $result = FormValidator::Simple->check( $q => [ sno +t => [ [ qw/ DATETIME_STRPTIME %Y-%m-%d / ] ], ] ); warn $result->has +_error; "
|
|---|