title: Maxlength validation stopping me from writing more than the maxlength in mvc6
body: <p>I'm following an asp.net core course on Pluralsight(this one specifically <a href="https://app.pluralsight.com/library/courses/aspnetcore-mvc-efcore-bootstrap-angular-web/table-of-contents" rel="nofollow noreferrer">https://app.pluralsight.com/library/courses/aspnetcore-mvc-efcore-bootstrap-angular-web/table-of-contents</a>), where we develop a full web app, currently, on the validation chapter of a contact form, the issue I'm having is that I have a textarea, where whenever it's max length is surpassed you should still be able to write in it but get an error, and when you delete up to the max length the error should disappear, but in my case I can't write anything more than the max length, thus making the validation error not appear at all.</p>
  <p>contact.cshtml</p>
  <pre><code>@model ContactViewModel;
  @{
      ViewBag.Title = &quot;Contact us&quot;;
  
  
  }
  @section Scripts{
      &lt;script src=&quot;~/lib/jquery-validation/dist/jquery.validate.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;~/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js&quot;&gt;&lt;/script&gt;
  }
  &lt;form method=&quot;post&quot;&gt;
      &lt;div asp-validation-summary=&quot;ModelOnly&quot;&gt;&lt;/div&gt;
      &lt;label asp-for=&quot;Name&quot;&gt;Your name:&lt;/label&gt;
      &lt;br /&gt;
      &lt;input asp-for=&quot;Name&quot; /&gt;
      &lt;span asp-validation-for=&quot;Name&quot;&gt;&lt;/span&gt;
      &lt;br /&gt;
      &lt;label asp-for=&quot;Email&quot;&gt;Email:&lt;/label&gt;
      &lt;br /&gt;
      &lt;input type=&quot;email&quot; asp-for=&quot;Email&quot; /&gt;
      &lt;span asp-validation-for=&quot;Email&quot;&gt;&lt;/span&gt;
      &lt;br /&gt;
      &lt;label asp-for=&quot;Subject&quot;&gt;Subject:&lt;/label&gt;
      &lt;br /&gt;
      &lt;input type=&quot;text&quot; asp-for=&quot;Subject&quot; /&gt;
      &lt;span asp-validation-for=&quot;Subject&quot;&gt;&lt;/span&gt;
      &lt;br /&gt;
      &lt;label asp-for=&quot;Message&quot;&gt;Message:&lt;/label&gt;
      &lt;br /&gt;
      &lt;textarea rows=&quot;4&quot; asp-for=&quot;Message&quot;&gt;&lt;/textarea&gt;
      &lt;span asp-validation-for=&quot;Message&quot;&gt;&lt;/span&gt;
      &lt;br /&gt;
      &lt;input type=&quot;submit&quot; value=&quot;Send Message&quot; /&gt;
  &lt;/form&gt;
  </code></pre>
  <p>and here is my viewmodel file
  ContactViewModel.cs</p>
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel.DataAnnotations;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace DutchTreat.ViewModels
  {
      public class ContactViewModel
      {   
          [Required]
          [MinLength(5,ErrorMessage =&quot;Too short!&quot;)]
          public string Name { get; set; }
          [Required]
          [EmailAddress]
          public string Email { get; set; }
          [Required]
          public string Subject { get; set; }
          [Required]
          [MaxLength(10,ErrorMessage =&quot;Too long!&quot;)]
          public string Message { get; set; }
      }
  }
  </code></pre>
  <p>Here is a <a href="https://i.stack.imgur.com/7lGrh.png" rel="nofollow noreferrer">snippet showing how every other error works</a></p>
  <p>I tried using StringLength instead of MaxLength, I googled around a bit but couldn't find an answer
  Is there something I'm missing? If you need additional code I can provide it</p>