Getting the index of Object Collection Validator

Topics: Validation Application Block
Jun 14, 2010 at 4:02 AM


My scenario is this. I have a book class with a chapter name collection. I have a Object Collection Validator applied to the collection which 'points' to another validator in a ruleset to check for chapter name string length.

Although the validation works as expected, is there any way to get the index of the item that failed validation?

The validation result object contains a property called Validator, but this points to the validator that performed the check, not the Object Collection Validator.




Jun 16, 2010 at 1:36 AM

That's not supported out-of-the-box.  You would need to create your own custom validator which can do that.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.