Multiple Conditions in a single rule

28 views
Skip to first unread message

bhendel

unread,
Dec 13, 2011, 4:26:13 PM12/13/11
to ValidateThis
I have two conditions defined "IsNotGlobal" and "HasPercentageOff".

I would like to do something like this:

<property name="percentageOff">
<rule type="required" condition="HasPercentageOff,IsNotGlobal" />
</property>

Such that both conditions must be true for that field to be required.
Nowhere in the WIki (that I can find) does it spell out the rules for
combining multiple conditions.

Thanks!

-Brian

Matt Quackenbush

unread,
Dec 13, 2011, 5:08:51 PM12/13/11
to valida...@googlegroups.com
Have you tried...

<property name="percentageOff">
  <rule type="required" condition="HasPercentageOff"  />
  <rule type="required" condition="IsNotGlobal"  />
</property>

??


--
You received this message because you are subscribed to the Google Groups "ValidateThis" group.
To post to this group, send email to valida...@googlegroups.com.
To unsubscribe from this group, send email to validatethis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/validatethis?hl=en.


Bob Silverberg

unread,
Dec 13, 2011, 5:33:01 PM12/13/11
to valida...@googlegroups.com
I don't think that will work. This is not something that is directly
supported by the framework at the moment, but is on the roadmap. In
the meantime, although I realize it isn't ideal, you can create an
additional condition that combines those two and then assign that to
the rule.

Bob

--
Bob Silverberg
www.silverwareconsulting.com

Reply all
Reply to author
Forward
0 new messages