I have a custom DataAnnotationsModelValidatorProvider for more accurate model validation and then just adding attributes. I tried adding my resource to global.asax.cs as follows:
ModelValidatorProviders.Providers.Clear(); ModelValidatorProviders.Providers.Add(new AttributeValidatorProvider());
But as soon as I upload my form, I get an error: "The names of validation types in unobtrusive client validation rules must be unique. The next type of validation was viewed more than once: required."
According to a comment on this blog , this is due to the fact that Ninject redefines specialized vendors of validators.
I am new to MVC and I cannot find a way to tell Ninject to accept my custom providers as well, how would I decide to fix this problem?
For the record: I don't want to use Fluentvalidation.net, I want to stick to standard MVC confirmations (for the most part).
source share