Imagine I have a set of choices having different set of values but also the chance to input a free value (usually a number)e.g.<select name=choiceA>    <option value=One>     <option value=Two>     ....    <option value=Nth></select>or<input name=freeNumChoice type=number/>Not all combinations are possible so I need to represent rules of exclusion in some data structure.I'm not asking for language syntax but more on how to data strcture my  rules for combinations.Programming language would be javascript and data for rules would be expressed as JSON documents.Example (pseudo code) possible ruleschoiceA whitelist only o1,o2,o3 (options) for choiceBchoiceE blacklists choiceA's  o1choiceC if greater than 5 then whitelist only o1 for choiceBwhat would you suggest? is there around ant theory about this problem (looks like to be a common one)thanks
What's the best data structure to represent rules limitations?
data structures