impossiblerobot has asked for the wisdom of the Perl Monks concerning the following question:
Does anyone know how to validate a form -- using the normal Data::FormValidator interface -- for a case where there are two text fields, of which at least one needs to be filled in?
Specifically, I have a form with two fields, Zip Code and Postal Code, and I need to make sure that either one or the other is filled, then use a constraint to validate the filled field.
I've tried several approaches, but I'm stumped. I would prefer not to hack the module (or subclass it) unless absolutely necessary, but that looks like the next step.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Data::FormValidator and Either/Or Fields
by dwiz (Pilgrim) on Jun 14, 2002 at 06:31 UTC | |
by impossiblerobot (Deacon) on Jun 14, 2002 at 16:05 UTC |