views:

9

answers:

0

I need to validate some sets of fields in a form, and I've researched enough to figure out how to do it with a Class level DataAnnotation attribute, but I'm thinking that this has got to be a not uncommon situation, so I'm wondering if anybody knows where such an attribute has been published. I'm not coming up with anything meaningful by googling it.

What I need is, given a form with multiple check box fields, IsValid requires that at least one of them be checked. I can also think of similar Attributes where exactly one is checked, and where at most one is checked.

Does anybody know an open source DataAnnotation library that will accomplish that?