Getting the index of Object Collection Validator

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

Hi,

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.

 

Thanks

Vince

Jun 16, 2010 at 12: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.
entlib.support@avanade.com