perlron has asked for the wisdom of the Perl Monks concerning the following question:
I am not able to correctly process a list of error fields returned from my form validator.
Even if three fields fail the required validation, only 1 field eg- s_tel is getting printed in the markup.
The results from FormValidator are accurate and all three fields are getting retrieved.(confirmed with logging statements)
any advice would be great !
Code in CGI_Application module[% IF error_list %] [% FOREACH i IN error_list %] [% i %] | [% END %] [% END %]
my $input_profile = { required => [qw( s_addr s_tel s_adv01)] }; my $results = Data::FormValidator->check(\%validation_params,$inpu +t_profile); my %ret_params = ( 'error_list' => $results->missing); if($results->has_invalid or $results->has_missing){ return $self->tt_process('school_register.tt',\%ret_params); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: List Data in TT and CGI_Application
by Loops (Curate) on Oct 17, 2014 at 19:51 UTC | |
by perlron (Pilgrim) on Oct 17, 2014 at 19:57 UTC |