title: EmailAddress or DataType.Email attribute
body: <p>What is the difference between the <code>[EmailAddress]</code> and the <code>[DataType(DataType.Email)]</code> attribute?</p>
  
  <p>What is the difference between the <code>[Phone]</code> and <code>[DataType(DataType.PhoneNumber)]</code> attribute?</p>
  
  <pre><code>[EmailAddress]
  public string Email { get; set; }
  
  [Phone]
  public string Phone { get; set; }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>[DataType(DataType.Email)]
  public string Email { get; set; }
  
  [DataType(DataType.PhoneNumber)]
  public string Phone { get; set; }
  </code></pre>
  
  <p>Are these the same or is there any difference? What is the difference? Which is the preferred way? When should which be used?</p>