griffin.mvccontrib icon indicating copy to clipboard operation
griffin.mvccontrib copied to clipboard

No constructor for LocalizedModelValidatorProvider takes 1 argument

Open danielbsig opened this issue 10 years ago • 0 comments

According to the example code in the article at CodeProject, you should initialize the library like this:

var stringProvider = 
    new ResourceStringProvider(Resources.LocalizedStrings.ResourceManager);
ModelMetadataProviders.Current = new LocalizedModelMetadataProvider(stringProvider);
ModelValidatorProviders.Providers.Clear();
ModelValidatorProviders.Providers.Add(
    new LocalizedModelValidatorProvider(stringProvider));

However, using the latest version of the library, I get a compiler error on the last line, because the class LocalizedModelValidatorProvider has only a parameterless constructor.

Is the sample code out of date?

danielbsig avatar Jun 29 '14 12:06 danielbsig