[Catalyst] html-widget IfThen constraint

Carl Franks fireartist at gmail.com
Wed Mar 1 13:29:48 CET 2006


I'd like to add a new constraint, which makes 1 or more fields
required only if another named field is present.

Something like:
->constraint( 'IfThen', 'cc', 'num', 'pin' )

meaning 'num' and 'pin' are only required if 'cc' is present.

Is IfThen a suitable name? Any better ideas?

Carl



More information about the Catalyst mailing list