in reply to Form Validation Ideas

I'm not quite sure that I know that FormBuilder is the option I'm looking for. I already know a bit of Javascript and I have all the javascript validation handled. Now its time for perl. Are there any solutions that do not deal with javascript validation, just perlside?

Replies are listed 'Best First'.
Re^2: Form Validation Ideas
by stiller (Friar) on Feb 25, 2008 at 13:59 UTC
    For the part of your question about quickly testing a lot of params to see if they hava a value, you could do something like:
    my %missing; for my $item (qw{fname sname age street city zip etc}){ $missing{$item} = param($item) ? 0 : 1; }
    While you're at it you could do some basic cleansing inside the loop, and attack specific fields afterwards.
    hth

      That works until you have a parameter where "0" is a valid value.

      my @param_names = $q->param(); my %present_params; @present_params{ @param_names } = (1) x @param_names;

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.