Subject: | failure using object for data to check() |
First, the code that was failing:
my $q = $self->query; # CGI object via CGI::Application
my $profile = {required=>[qw(note)]};
my $dfv = Data::FormValidator->new({}, $self->param('dfv_defaults') );
my $r = $dfv->check($q, $profile);
The problem I'm experiencing is that only occasionally do this actually work! :-) The validation succeeded, but yet the required field ("note") was blank. When I passed a hashref of data to check({$q->Vars}) it worked 100%. I didn't debug within D::FV::Results, but it seems as if the CGI object data was not getting populated.
I want to say I'm really looking forward to using this module! The built-in functionality is super, and customization looks pretty easy. I've got the glue completed in my CGI::Application super class (based on CGI::Application::ValidateRM) so using it going forward should be a breeze.
Versions:
Data::FormValidator: 3.50
CGI.pm: 2.77
perl 5.005_003
Apache/1.3.22
mod_perl/1.26
Linux 2.2.14-5.0smp #1 SMP