title: MaxLength does not work, ModelState.IsValid always true - (ASP.MVC 6)
body: <p>I have a method that have <code>[FromBody]</code> parameter but it <code>ModelState.IsValid</code> keep returning <code>true</code> if values are longer than they limited with <code>MaxLength</code> attributes in the mapped object.</p>
  
  <pre><code>public class AddUserMsg
  {
      [MaxLength(10)]
      public string name;
  }
  
  [HttpPost("[action]")]
  public IActionResult AddUser([FromBody] AddUserMsg msg)
  {
      // Always true even if the name is longer than 10 symbols
      if (ModelState.IsValid)
      {
      }
  }
  </code></pre>
  
  <p>I thought it suppose to validate posted data. Any ideas why it does not?</p>