The Problem with this class:
public class ApplicationVM
{
public int Id { get; set; }
public string ApplicantFullName { get; set; }
public DateTime DateOfCreation { get; set; }
public DateTime? DateOfSent { get; set; }
public int NumberOfDays { get; set; }
public ApplicationTypeVM Type { get; set; }
public ApplicationStatusVM Status { get; set; }
[Required(ErrorMessage = "StatedDates required")]
[RegularExpression(@"^((?:^|\s*)\d{2}\.\d{2}\.\d{4})*$", ErrorMessage = "StatedDates invalid")]
public string StatedDates { get; set; }
[UIHint("CoordinatorEditor")]
[Required(ErrorMessage = "Coordinator required")]
public string CoordinatorFullName { get; set; }
public string Comment { get; set; }
}
Data annotations error messages don't localize. I inherit this class for other view models which are used on UI. For example, this one:
public class RemoteWorkingApplicationVM : ApplicationVM
{
[Required(ErrorMessage = "WorkingPlan required")]
public List<ActivityVM> WorkingPlan { get; } = new List<ActivityVM>();
}
Other localization is working. I think the problem is with inheritance. What do you think?