Enable/Disable ValidationRuleOld forum URL: forums.lhotka.net/forums/t/5118.aspx
ixman posted on Friday, July 18, 2008Is possible to enable/disable a validation rule on a BO property based on another property value? What I mean is that I have a checkbox and when is checked, then a textbox should be mandatory. Any ideas?
skagen00 replied on Friday, July 18, 2008
In this case you're really not talking about disabling a rule, you're talking about a rule that simply has more logic to it than the CommonRules.StringRequired rule.
I'd just write a separate validation rule that checks - is my checkbox checked and there's no text in the textbox? Then the rule is broken. Otherwise, it's not broken.
Copyright (c) Marimer LLC