views:

44

answers:

1

Say you have a standard ValidationSummary:

<%: Html.ValidationSummary(excludePropertyErrors: true) %>

If the ModelState contains model errors for properties but not for the model itself the ValidationSummary renders the following HTML:

<div class="validation-summary-errors"><ul><li style="display:none"></li></ul></div>

Which is displayed as an empty list but is still visible because of the red border around the list. This seems to be a bug to me. Can I turn off that the ValidationSummary helper will ever render an empty list?

A: 

After I found out that there is no solution by looking at the source I solved the problem by forking the MVC version of the code and modifying one line.

usr