Suggestion to have passed Validators collection in ValidationResults

Topics: Validation Application Block
Mar 8, 2007 at 10:58 AM

Here is one more scenario it turned out I can't realize at run-time.

1. I have some Validators assigned to class properties and calling Validate() I got IsValid true.
2. There is a very important validator for me among these validators I want to log out if it passed or not (by result.Validator or result.Target).
3. If it fails that's no problem, but if it passes I don't know it really passes or it is absent in configuration

I see that I can just get Validators collection as ValidationFactory.CreateValidatorFromX(), find out the one I needed and check if it is in ValidationResults or not. But I guess having additional ValidationResult (PassedValidationResults) collection within ValidationResults might avoid of wrapping Validation class and I also can be sure that the validator was actually called.