Extending ValidationResult

Topics: Validation Application Block
Apr 17, 2007 at 1:31 PM
I wonder if the ValidationResult could be extended. It seems like there is no interface implemented to the ValidatioResult. All my classes implement a base interface with 3 properties (BaseId, BaseIdentifier and BaseName). The Id maps the database id, the identifier gives a string representation of the location of the object in my domain (like a sort of breadcrumb trace), the basename returns a human readable representation of the class (the actual class name migth be to technical).

Now I'd like to show my validationresults including my base information in a grid. For now I created my own validationresult that encapsulates the default one, but this is not the preferred way.

Apr 17, 2007 at 4:10 PM
We didn't consciously make this an extensibility point so we didn't do any testing or have any recommendations on the best way of apporaching this. I would imagine you could subclass ValidationResult easily enough, but there isn't any factory for creating instances so you would need to modify all of the validators. Probably the path of least resistance would be to simply modify the existing class.