tags:

views:

40

answers:

1

I have 3 portals on the view (one form) with one submit button. I need to have validation summary for each of this portals. Is there any way have validation groups fro summary validations like in asp.net? I was thinking that if i put Htm.Validation Summary on each portal it will validate only inputs for this portal, but it is not, all ValidationSummary helpers on the page frernig for all inputs and in result i have three places on the page where displaying the same validation errors. Is there any way to say to validationsummary which partials/inputs to validate, kind of like validationsmmary groups behavior in asp.net

A: 

The ValidationSummary methods don't have any facility for discriminating between different partial views. One solution would be to create your own extensions which accept a filter parameter and add the ModelState errors yourself using a name you can pass to your extension.

Derek Greer
Is there any samples how to do this?
Juk