As an example, say I have a single domain object with 100 properties. In my UI I need complex validation of the style:
If A = 1, show controls B, C, D. B is required, C is not, and D is not required must be less than 30 if it is populated.
If A = 2, show controls B, D, E. B is not required, D is required but has no limits, and E is not required.
If A = 3, show controls B, E, F. B is required and must be more than 10, E is required, F is not required.
If B = 3 and F = 5, then show control G, but only when A = 3.
You can see my problem here. The relationships between the properties are hideously complex, with validation changing dependant on earlier values and in combination with other values.
How have people modelled and handled this in the past? Validation does not need to very often, but a config/xml-based solution would probably be best.
Thanks.