public ActionResult CreateNewPerson(Person data)
 {
     if (!ModelState.IsValid)
     {
         var errors = ModelState.Where(x => x.Value.Errors.Count > 0)
         .Select(x => new
         {
             Key = x.Key,
             Errors = x.Value.Errors.Select(e => e.ErrorMessage)
         });
         return Json(new { success = false, errors = errors }, JsonRequestBehavior.AllowGet);
     }
     else
     {
         /*Here can save into db*/
         return Json(new { success = true }, JsonRequestBehavior.AllowGet);
     }
 }
 public ActionResult CreateNewPerson()
 {
     Person model = new Person();
     return PartialView(model);
 }