Default resource for data annotations in ASP.NET MVC
问题 There's a way to set the default resource to the data annotations validations? I don't wanna make something like this: [Required(ErrorMessage="Name required.", ErrorMessageResourceType=typeof(CustomDataAnnotationsResources)] public string Name { get; set; } I would like something like this: Global.asax DataAnnotations.DefaultResources = typeof(CustomDataAnnotationsResources); then [Required] public string Name { get; set; } someone gimme a light! thanks in advance EDIT My real problem was