2
Vote

Cannot use multiple validation summaries

description

In my situation I want to use multiple validation summaries, each showing the erros relating to a section of the page.
For this I added multiple calls like this:
Html.ClientSideValidation<MyEntity>("myEntity1").UseValidationSummary("mySummary1")
In the other calls the "myEntity1" and "mySummary1" are a bit different of course.
 
The result is that all validation errors are shown in the first summary, but what I want (and expect) is that the valiation errors for the second ClientSideValidation call are displayed in the second summary and so on.
 
I am using jquery for the clientside validation.

comments

softlion wrote Feb 23, 2010 at 9:34 AM

Also xVal does not support when more than one form is on the same page.
Using the "prefix" is a bit hard when using strongly typed HtmlHelpers. Also i do not understand why the prefix would be used to select a form's elements to validate as DataAnnotations are here to do that.

It would be nice to just specify the form id in the ClientSideValidation method, so only the elements in the specified form are validated.

wrote Feb 14, 2013 at 1:14 AM