Imagine I have a set of choices having different set of values but also the chance to input a free value (usually a number)
<select name="choiceA"> <option value="One"> <option value="Two"> .... <option value="Nth"> </select>
<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.
Example (pseudo code) possible rules
choiceA whitelist only o1,o2,o3 (options) for choiceB
choiceE blacklists choiceA's o1
choiceC if greater than 5 then whitelist only o1 for choiceB
what would you suggest? is there around ant theory about this problem (looks like to be a common one)