Inherited properties and MetadataType does not seem to work with client side validation in ASP.NET MVC 2.
The validation of our MetadataTypes work a
Maybe it's too late but this is the way I managed to solve this bug.
I've created a custom model metadata provider that inherits from DataAnnotationsModelMetadataProvider and override the CreateMetadata method.
The problem is that the value in containerType parameter points to the base class instead of pointing to inherited class.
Here is the code
public class CustomModelMetadataProvider : DataAnnotationsModelMetadataProvider
{
protected override ModelMetadata CreateMetadata(
IEnumerable attributes,
Type containerType,
Func
And finally we have to register this custom metadata provider in Global.asax at Application_Start
ModelMetadataProviders.Current = new CustomModelMetadataProvider();
Sorry for my English!