title: Client-side validation difference between Html.TextBoxFor/Html.TextAreaFor and Html.EditorFor (with [DataType(DataType.MultilineText)])
body: <p>I am using client-side validation (unobtrusive) in ASP.NET MVC 3/Razor and I got it to work on a <code>&lt;textarea&gt;</code> by using Html.EditorFor and specifying DataType.MultilineText, but should not Html.TextAreaFor also have client-side validation? </p>
  
  <pre><code>[Required(ErrorMessage = "Foo")]
  public string Message { get; set; }
  
  // Does add client-side validation
  @Html.TextBoxFor(m =&gt; m.Message)
  
  // Does NOT add client-side validation
  @Html.TextAreaFor(m =&gt; m.Message)
  </code></pre>
  
  <hr>
  
  <pre><code>[Required(ErrorMessage = "Foo")]
  [DataType(DataType.MultilineText)]
  public string Message { get; set; }
  
  // Does add client-side validation (and multiline)
  @Html.EditorFor(m =&gt; m.Message)
  
  // Does NOT add client-side validation
  @Html.TextAreaFor(m =&gt; m.Message)
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;add key="ClientValidationEnabled" value="true" /&gt;
  &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
  </code></pre>