I've done some searching on Google and Stack Overflow but can't find the answer to this one.
I have the following in my view
@if (!Html.ViewData.ModelState.IsValid)
{
@Html.ValidationSummary(true)<br />
}
I'm only interested in model errors but the test will return true if property errors are found. How do I test just model errors?
I may need to clarify here, I want to do the test to stop the <br />
being written out when there is a property error but no model error.