views:

55

answers:

1

Hi there!

I have a number of forms with checkboxes that need validating. For example I might have a form with 3 checkboxes and one of those 3 needs ticking and another form with 50 boxes that might need at least one item checking.

Does anyone have a ValidationAttribute that would work under these circumstances.

Many thanks for any pointers.

+1  A: 

You can do that with class-level validation attributes (as opposed to property-level attributes). I've written a blog article describing how to implement this on both the server and the client side if you want to make this really ajaxy... :-)

Adrian Grigore
Adrian, I'll have a look at your examples, thanks.
beebul