The best solution I found for this was based on the following: https://gist.github.com/benfoster/4016852
You have to create your own validator provider (as shown in link), and your own validator which will set up a ValidationContext
with the proper displayName such that
validationContext.DisplayName = displayNameMappingFunction(metadata.GetDisplayName());
You then need to register the validator provider globally by using GlobalConfiguration.Services, or you need to create an IControllerConfigurationAttribute
which will configure it just for one controller.
You do config.Services.Replace(typeof(ModelValidatorProvider), new CustomDisplayNameProvider()