If your call to @ Html.ValidationSummary () is in partial view, DO NOT pass the data in partial form as follows:
@Html.Partial("_YourForm", Model, new ViewDataDictionary { { "Submit", true }})
Instead, first add a pair of key values to the Html.ViewData collection:
@{ Html.ViewData.Add(new KeyValuePair<string,object>("Submit",true)); }
then call the partial view:
@Html.Partial("_YourForm", Model, Html.ViewData)
this will allow ModelState to correctly propagate to a partial view.
source share