I check to see if there has been a validation problem using the ModelState.IsValid property in the controller class. Listing 2-17 shows how I have done this in the POST-enabled RsvpForm action method in the Home controller class.
How to check for Model validation errors. Remember that by using the Html helpers, typed models for views and data annotations, a lot of the validation logic is given for free.
Share this highlighthttp://www.safaribooksonline.com/a/pro-aspnet-mvc/71049/