title: asp.net core default ErrorMessageResourceName and Type
body: <p>I have this class:</p>
  
  <pre><code>public class CategoryViewModel
  {
      [Required(ErrorMessageResourceName = "RequiredErrorMessage", ErrorMessageResourceType = typeof(Resources)), StringLength(100, ErrorMessageResourceName = "IdStringLengthErrorMessage", ErrorMessageResourceType = typeof(Resources))] public string Id { get; set; }
      [Required(ErrorMessageResourceName = "RequiredErrorMessage", ErrorMessageResourceType = typeof(Resources)), StringLength(255, ErrorMessageResourceName = "StringLengthErrorMessage", ErrorMessageResourceType = typeof(Resources))] public string Name { get; set; }
      [StringLength(255, ErrorMessageResourceName = "StringLengthErrorMessage", ErrorMessageResourceType = typeof(Resources))] public string Image { get; set; }
      public bool Active { get; set; }
  }
  </code></pre>
  
  <p>As you can see it has custom error messages coming from my <strong>Resources.resx</strong> file.
  I am about to create a lot more models and I would like it if I didn't have to specify the <code>ErrorMessageResourceName</code> and <code>ErrorMessageResourceType</code> for each one.</p>
  
  <p>I would like to set all <strong>Required</strong> attributes to use my <strong>RequiredErrorMessage</strong> and my <strong>StringLength</strong> attributes to use <strong>StringLengthErrorMessage</strong>.</p>
  
  <p>Is this possible?</p>