Summary of Validation with JQuery in MVC 2

I am trying to get client validation on my asp.net mvc 2 web application (Visual Studio 2010). IS client side validation check . However, the summary of the check is not.

I am including the following scripts

<script type="text/javascript" src="../../content/scripts/jquery-1.4.1.js"></script>
<script type="text/javascript" src="../../content/scripts/jquery.validate.js"></script>
<script type="text/javascript" src="../../content/scripts/MicrosoftMvcJQueryValidation.js"></script>

      

Have this before this form is run

<% Html.EnableClientValidation(); %>

      

and inside the form

<%: Html.ValidationSummary("There are some errors to fix.", new { @class = "warning_box" })%>
<p>
    <%: Html.LabelFor(m => m.Name) %><br />
    <%: Html.TextBoxFor(m => m.Name) %>
    <%: Html.ValidationMessageFor(m => m.Name, "*") %>
</p>

      

I have the latest MicrosoftMvcJQueryValidation.js from the MvcFutures download, but it doesn't seem to support summary validation. I tried to fix this by setting additional parameters such as errorContainer and errorLabelContainer, but it looks like there are some other problems with it.

Is there an updated / improved version of this file?

+2


a source to share


1 answer


The best solution I have found so far is a patch from Ince found in jQuery.validate and Html.ValidationSummary playing well together .



+1


a source







All Articles