title: Data Annotation unable to get Error message from ModelSate other than Required
body: <p>I am using <code>Data Annotation</code> for server side validation and from the client i send the data to the controller and then from <code>ModelState</code> i am trying to get the <code>ErrorMessage</code>.</p>
  
  <p><strong>My code.</strong></p>
  
  <pre><code>[Required(ErrorMessage = "Order ID cannot be null")]
      [Range(0, int.MaxValue, ErrorMessage = "OrderID must be greater than 0.")]
      public int OrderID
      {
          get;
          set;
      }
      [Required]//(ErrorMessage = "Customer ID cannot be null")]
      [StringLength(5, ErrorMessage = "CustomerID must be 5 characters.")]
      public string CustomerID
      {
          get;
          set;
      }       
  </code></pre>
  
  <p><strong>My controller code</strong></p>
  
  <pre><code>public ActionResult Validate(EditableOrder order)
      {
          if (!ModelState.IsValid)
          {
              List&lt;string&gt; errorlist = new List&lt;string&gt;();
              foreach (ModelState modelState in ModelState.Values)
              {
                  foreach (ModelError error in modelState.Errors)
                  {
                      errorlist.Add(error.ErrorMessage);
                  }
              }
              return Content(new JavaScriptSerializer().Serialize(errorlist));
          }
          return Content("true");
      }
  </code></pre>
  
  <p><strong>My Script code.</strong></p>
  
  <pre><code> var record = args.data;
          $.ajax({
              url: "/Inlineform/Validate",
              type: "POST",
              data: record,
              success: function (data) {
                  var errorlist = JSON.parse(data);
                  var i;
                  if (errorlist.length)
                  {
                      args.cancel = true;
                      var str="";
                      $.each(errorlist,function(index,error){
                          str+="&lt;tr&gt;&lt;td&gt;"+error+"&lt;/td&gt;&lt;/tr&gt;";
                      });
                      $("#ErrorList").html("&lt;table&gt;"+str+"&lt;/table&gt;");
                  }
              }
  </code></pre>
  
  <p>When the request is made to the action <code>Validate</code> I can able to bind it with the <code>EditableOrder</code> and in ModelState i only getting the <code>ErrorMessage</code> of <code>Required</code> and not <code>Range</code> or <code>StringLength</code>.</p>
  
  <p>What goes wrong here?</p>
  
  <p>Thanks.</p>