diff --git a/chap3_your_first_mvc_app/PartyInvites/Controllers/HomeController.cs b/chap3_your_first_mvc_app/PartyInvites/Controllers/HomeController.cs index 9020d90..a536625 100644 --- a/chap3_your_first_mvc_app/PartyInvites/Controllers/HomeController.cs +++ b/chap3_your_first_mvc_app/PartyInvites/Controllers/HomeController.cs @@ -37,8 +37,16 @@ namespace PartyInvites.Controllers [HttpPost] public ActionResult RsvpForm(GuestResponse guestResponse) { - // TODO: Email guestResponse to the part organizer - return View("Thanks" ,guestResponse); + if (ModelState.IsValid) + { + // TODO: Email guestResponse to the part organizer + return View("Thanks", guestResponse); + } + else + { + // there is a validation error - redisplay the for + return View(); + } } } } \ No newline at end of file