You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to formh...@googlegroups.com
Hey all.
I have a form that has several fields with the unique attribute, some of
which are
set to be inactive in the call to process().
With HTML::FormHandler 0.40013 and HTML::FormHandler::Model::DBIC 0.21
I'm seeing
the following error (plus the top of the stack trace)
Cannot delegate has_errors to has_errors because the value of result is
not defined at
/usr/local/strategic/perl/lib/site_perl/5.14.1/x86_64-linux-thread-multi/Moose/Meta/Method/Delegation.pm
line 99
HTML::FormHandler::Field::has_errors('HTML::FormHandler::Field::Text::10=HASH(0xaab5680)')
called at
/usr/local/strategic/perl/lib/site_perl/5.14.1/HTML/FormHandler/TraitFor/Model/DBIC.pm
line 258
HTML::FormHandler::TraitFor::Model::DBIC::validate_unique('BOiMHC::Form::MdsUser=HASH(0xabdc9e8)')
called at
/usr/local/strategic/perl/lib/site_perl/5.14.1/HTML/FormHandler/TraitFor/Model/DBIC.pm
line 56
HTML::FormHandler::TraitFor::Model::DBIC::validate_model('BOiMHC::Form::MdsUser=HASH(0xabdc9e8)')
called at /home/vagrant/perl5/lib/perl5/HTML/FormHandler.pm line 534
HTML::FormHandler::validate_form('BOiMHC::Form::MdsUser=HASH(0xabdc9e8)') called
at /home/vagrant/perl5/lib/perl5/HTML/FormHandler.pm line 411
I think the cause is due to
HTML::FormHandler::TraitFor::Model::DBIC::validate_unique calling
$field->has_error on an inactive field which has no result. Is the best
solution a patch to
check that the field is inactive or has no result before checking for
errors in validate_unique?