title: TextArea field Validation in Asp.Net MVC
body: <p>Can any one suggest text areas field validation in asp.net mvc.I tried many ways but  no luck</p>
  
  <p>My View for text area:</p>
  
  <pre><code>@Html.TextAreaFor(m =&gt; m.EmailTemplate, new { rows = "10", cols = "150", @class = "form-control", @id = "Email", required = "required", @maxlength = "10000" }) 
  @Html.ValidationMessagefor(m =&gt; m.EmailTemplate, new { @class = "text-danger"}); 
  @Html.ValidationMessage("CustomError", new { @class = "text-danger" })
  </code></pre>
  
  <p>My Model:</p>
  
  <pre><code>[AllowHtml] 
  [Required(ErrorMessage ="Email Template is required")] 
  public string EmailTemplate { get; set; }
  </code></pre>
  
  <hr>
  
  <hr>