in reply to Perl Form Validator problems.
For the state part, in drop-down cases I always do it like this:unless ( length $f_zip == 5 ) { $f_zip_error = "<font color=\"red\">Zip code cannot be blan +k and must be 5 digits in length.</font><BR>\n"; $p_Terrors = $p_Terrors + 1; }
Hint: Since it's a drop-down box, it will always return a value, so you can't use something like:if ($f_state eq "null") { $f_state_error = "<font color=\"red\">State may not be blank.</ +font><BR>\n"; $p_Terrors = $p_Terrors + 1; + } ...
orif (! defined $f_state) { ...
Hope it helps.if ($f_state eq "") { ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl Form Validator problems.
by chromatic (Archbishop) on Apr 27, 2002 at 17:19 UTC | |
|
Re: Re: Perl Form Validator problems.
by DigitalKitty (Parson) on Apr 27, 2002 at 20:52 UTC | |
by DaWolf (Curate) on Apr 28, 2002 at 00:36 UTC |