views:

1063

answers:

3

Duplicate Answered here: validate multiple forms

If all asp.net controls are required to be within a form in order to be generated, how does one go about using the jquery validation plugin with multiple forms on the same page?

What I mean by that is, how can I have two forms both containing asp controls that can be validated independently with jquery validation?

A: 

I also want to this.

Thanks in advanced

itciti
A: 

I also need it.

thanks.

Ajmal Mohamed
A: 

I've also come across this issue. So far I have handled reporting the validation to the user as follows...

$(".customFormsClass").each(function(){ $(this).validate().form(); }).each(function(){ if(!$(this).validate().form()){ $(this).show; return false; } });

...that will allow me to validate all my forms and then send the user to the first invalid form. However, I haven't yet figured out the logic in order to execute a block of code ONLY when all forms are valid.

I know this isn't a full answer, but maybe we can help each other towards a solution