public ActionResult AddUser(RegisterViewModel input) { List <string> errorMsg = new List <string>(); CommonFacade.AddUserData(input, out errorMsg); if (errorMsg.Count > 0) { return(Json(new { result = "ERROR", errorMsg = errorMsg })); } else { return(Json(new { result = "OK" })); } }