60
95.3
Oct 11, 2010
Matt
Although I have no experience in MVP, I can offer a possible suggestion.
The way that we achieve this within out framework is to encapsulate the rules within the concrete class and have a collection of 'BrokenRules' available to the client. For example, if you are constructing the class and it requires a date to be set, the 'Validate' method with the class can be called and this will add the rule to the collection. You can then check this collection or alternatively have a property of 'IsValid' which is set after the Validate method has been called. Although it does not tie into a specific control, you will have access to the rules that are broken and can display these within a generic control capable of displaying them.
This requires the use of a factory to build the object and have the associated code built in.
If this is something that may work for you, let me know and I can stick up some code.
Chris