title: .NET MVC Model Attribute Validation
body: <p>I am doing a MVC application, which includes registering function. Model takes many attributes, for example. I only want to accept several domains of emails given (for example only gmail). How do I validate it?</p>
  
  <pre><code> [Required]
   [EmailAddress]
   [Display(Name = "Email*")]
   public string Email { get; set; }
  </code></pre>