ModelState.IsValid is returning false for me in my controller. I know that means one or more model errors were found when model binding. My question is how do I see the errors?
I noticed that my particular ModelState has 6 items in it. If I try to do any of these...
ModelState[0].Errors[0].ToString()
ModelState[0].Errors[0].ErrorMessage
ModelState[0].Value.AttemptedValue
I get this error:
The best overloaded method match for 'System.Web.Mvc.ModelStateDictionary.this[string]' has some invalid arguments