views:

64

answers:

1

Using the (MS) Enterprise Library, Validation Application Block (VAB), you can include attributes in your code to define rule sets. I have applied the attributes to the properties of a class and I have defined two rule sets (the properties fall into two validation groups). Unfortunatly there is some overlap between the two rule sets (some properties are in both groups).

Can a validation attribute belong to multiple rule sets and what does the syntax look like? If this is not possible, is there a work-around?

+1  A: 

The work-around is simply to duplicate every validation attribute for every rule set.

Seventh Element