title: MVC 4 Razor. Partial View Form Validation
body: <p>I have a Partial View <b>EnquiryForm</b> on my <b>index</b> page, I am trying to post data to from Partial View.</p>
  
  <pre><code> [HttpPost]
   public ActionResult EnquiryForm(Booking model)
   {
      if (ModelState.IsValid)
      {
         ........
      }
      return RedirectToAction("Index", "Home");
   }
  </code></pre>
  
  <p>When the form is posted blank validation is not working, Server Side Validation</p>
  
  <p><b>Booking Model</b></p>
  
  <pre><code>public class Booking
  {
      [Required(ErrorMessage = " - Required" )]
      public string Name { get; set; }
  
      [Required(ErrorMessage = " - Required")]
      [RegularExpression(".+@.+\\..+", ErrorMessage = "In-Correct Email")]
      public string Email { get; set; }
  }
  </code></pre>
  
  <p>Regards
  Thanks</p>