title: Multiple Separate Regular Expressions
body: <p>I have an ASP.NET MVC application. This application contains a form for which I need to make multiple regular expression checks, which should have different errors depending on the issue.</p>
  
  <p>Does anyone know the way in which I would go about having separate errors? I have tried using multiple RegularExpression annotations on one model property, but this throws an error upon compilation. Here is a sample of the code:</p>
  
  <pre><code>[Required]
  [Display(Name = "Distribution List Name")]
  [StringLength(65, ErrorMessage = "Must be under 65 characters")]
  [RegularExpression("^#(CONTOSO|MEGACORP|TESTCOMPANY)([-_A-Za-z0-9 ]+)$", ErrorMessage = "Invalid company, or the name contains invalid characters (Allowed characters are alphanumeric, - and _)")]
  public string Name { get; set; }
  </code></pre>
  
  <p>Ideally, I would like the check for the company at the start of the string, and the allowed character check to throw separate error messages.</p>