validating .net validation controls using javascript
I need to validate multiple .net validation groups(a normal group would consist of RequiredFieldValidators, RegularExpressionValidators, ValidationSummary, etc) using javascript. I am using Page_ClientValidate("GroupName") to validate the groups. The problem arises when i validate multiple groups. The validation summary and errors only appear for the last group validated or nothing appears if the last group validated returns true. I want all validation summaries and errors to appear for all groups that return a false validation. I'll never validate all groups, so I can't use Page_ClientValidate(). I have multiple tabs on a page and each tab has 1 or more validation groups assigned to it. Any ideas/solutions would be most appreciated. I've hit a wall for now.
Example of what i am doing:
var Tab1 = false;var Tab2 = false;var Tab3 = false;
Tab1 = Page_ClientValidate("Tab1");
Tab2 = Page_ClientValidate("Tab2");
Tab3 = Page_ClientValidate("Tab3");
if(Tab1 && Tab2 && Tab3)
{
__doPostBack(SaveandExit,"");
}
|