Hi,
I am having an issue using the library where attributes that are validated client-side are causing the ValidationSummary to not display. The ValidationMesssage displays correctly, but the summary does not.
I've narrowed down the scenario that causes it to happen, I think. If you have an attribute that causes an error, such as email and you do something like the following, it will not display the summary:
@using (Html.BeginForm)
{
@Html.ValidationSummary("Please correct the errors below")
<div>@Html.TextBoxFor(m => m.Email) <div>@Html.ValidationMessageFor(m => m.Email)</div></div>
<input type="submit />
}
Basically, if you put the validation message inside any block level element, such as div, p, etc. before ValidationMessage, the ValidationMessage will display, but the ValidationSummary will not.
If you add a 'Required' attribute, the built-in .Net attribute will trigger the summary, but if you type something to violate the email validation, that does not trigger the summary.
Any suggestions on how I can get around this issue?
I appreciate all the work on the library. It has saved us a ton of time on a project that we are working on.
Thanks in advance for your help.