How to use CreateValidatorFromConfiguration with Windows Form validationProvider control?

Topics: Validation Application Block
Feb 15, 2008 at 4:40 AM
Hello everyone,

I'm working with multiple Configuration files. Here is the code that selects the Configuration Source for this validation:

Customer customer = new Customer();

Validator<Customer> customerValidator = ValidationFactory.CreateValidatorFromConfiguration<Customer>("RuleSetA", new FileConfigurationSource("CustomerRules.config"));
ValidationResults results = customerValidator.Validate(customer);

Then I have a Windows Form with a ValidationProvider control and an errorProvider control. Basically, I'd like that the form show the error icon if there is an error next to each control.

How can I set the ValidationProvider to use the results(ValidationResults) or how can I use the CreateValidatorFromConfiguration with the ValidationProvider control?

Thanks
Feb 22, 2008 at 2:52 AM
bump!! Any ideas how to achieve this?
Mar 11, 2008 at 1:00 AM
IIRC there is no way to use the Winforms or ASP.NET integration adapters with non-default configuration sources. Not sure if the EntLib team plans to address this in v4 or not (I suspect not).

Tom
Mar 16, 2008 at 11:39 PM
Tom,

Thank you for getting back to me. I don't understand why this was not implemented..... Hopefully this is addressed in v4


tomhollander wrote:
IIRC there is no way to use the Winforms or ASP.NET integration adapters with non-default configuration sources. Not sure if the EntLib team plans to address this in v4 or not (I suspect not).

Tom

Jan 28, 2010 at 7:22 PM

Hello,

Did you ever find out if this was implemented now in 4.1? The reason I am asking is because have a similiar issue. http://entlib.codeplex.com/Thread/View.aspx?ThreadId=82322

 

Jan 29, 2010 at 2:13 AM

This is still not supported in the 4.1 version.

 

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