freddo411 has asked for the wisdom of the Perl Monks concerning the following question:
Data::FV makes it easy to code constraints on $B and $C, or to require $B and $C if $A exists by setting up rules contained in a hash structure. Like so...
# snip dependencies => { # If A is "N", make list of inputs required "A" => { N => [ qw/ admin_contact_fk + tech_contact_fk billing_contact_fk / ], } }, constraints => { # check these inputs with these subs dn_id => 'OK_int', foo => 'OK_chars', }, # snip
I would like to write a construct so that if Input $A = exists, then Input $B and $C have to meet certain constraints. If $A isn't one of the inputs, then the $B anc $C have no constraints
I don't see any way other way, using D::FV, than writing custom constraints that take in $A, $B, and $C to solve my problem. Is this true?
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Data::FormValidator question
by freddo411 (Chaplain) on Mar 18, 2004 at 18:56 UTC |