Validation Result Object

Topics: Building and extending application blocks, General discussion, Validation Application Block
Jan 6, 2009 at 4:31 PM
Hi Guys,

I've had an idea.

When using WinForm / ASP Integration, the validator will handle all the field conversion, assignment and validation. If this passes, there seems to be no way to get hold of the result object, and it would have to be generated manually again, even though the fields have already been converted and formatted automatically.

A nice feature would be to be able to get a handle to the object that was created from the last Validation call. If the validation failed, this object would be null, otherwise it would be a valid object with all the desired fields filled in.

How feasiable would this be? Or is there already some kind of similar functionality in there already?

Regards

Tris
Jan 7, 2009 at 8:41 AM
There's no built-in functionality in EntLib for that.  If you're going to request for a feature for this and get other people to vote, it may be addressed through a new component but I don't think it would be through modifying the PropertyProxyValidator.  Simplifying the reason, the PropertyProxyValidator doesn't have the whole picture of the class of the property you're validating.  Think of this, it's entirely a common scenario that you won't have PropertyProxyValidator configured for each properties of the class.  In that case, how would it know what values to put to those properties. 


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com