[Catalyst] "update_from_form" and empty fields

Andy Grundman andy at hybridized.org
Fri Nov 18 21:18:03 CET 2005


Ken Youens-Clark wrote:
> My version of Class::DBI::FromForm is 0.03, so it looks like I do  need 
> to set the "missing_optional_valid => 1" for   OK, so ... how do  I do 
> that?  I tried this:
> 
>   $c->stash->{'item'}->update_from_form($c->form (missing_optional_valid 
> => 1));

It should be specified when you first call $c->form.  For example:

$c->form(
     required               => [ ... ],
     optional               => [ ... ],
     missing_optional_valid => 1,
);

...

$c->stash->{'item'}->update_from_form( $c->form );



More information about the Catalyst mailing list