title: ASP.net model validation isn't correct
body: <p>I have a model:</p>
  <pre class="lang-cs prettyprint-override"><code>public class Products
  {
      public int Id { get; set; }
  
      [Required(AllowEmptyStrings = false)]
      public string Name { get; set; }
  
      [Required(AllowEmptyStrings = false)]
      public string Description { get; set; }
  
      [Required]
      [DataType(DataType.DateTime)]
      public DateTime Created_at { get; set; }
  
      [Required]
      public int In_stock { get; set; }
  
      [Required]
      public decimal Price { get; set; }
  
      [Required]
      public int External_id { get; set; }
  }
  </code></pre>
  <p>Create handler of post request</p>
  <pre><code>public ActionResult CreateProduct(Products product)
  </code></pre>
  <p>In controller validate model</p>
  <pre><code>if (ModelState.IsValid) 
  </code></pre>
  <p>It's true if I pass this json</p>
  <pre><code>{
      &quot;name&quot;: &quot;something&quot;,
      &quot;description&quot;: &quot;something&quot;
  }
  </code></pre>
  <p>but if name or description property doesn't exist in JSON it'll be an error.</p>
  <p>I guess when product create all fields(beside string fields) initialize 0.</p>
  <p>So how can I fix that?</p>