Is it possible to validate a single property?

Topics: General discussion, Validation Application Block
Dec 20, 2008 at 5:08 AM

Hi,
I would like to know if it's possible to validate a single property rather than the all class.

A bit like what the Integration.Winform proxy does when you map it to an error provider

thanks a lot
Dec 22, 2008 at 9:12 AM
Hi,

You can validate a property programatically, here is a sample:

Cust

c = new Cust();

 

c.Address =

null;

 

 

NotNullValidator notNull = new NotNullValidator();

 

 

ValidationResults results = notNull.Validate(c.Address);



Valiant Dudan
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com

 

Dec 22, 2008 at 9:39 AM
I didnt think of that ,
Thanks a lot that is very very helpful