Please see my comments to your code:
<script type="text/javascript">
function submitTest()
{
var forms = $(".form-container");
forms.each(function (index, form) {
$(form).validate({
submitHandler: function (form) {
$.ajax(
{
....
});
}
});
});
forms.each(function (index, form) {
$(form).submit();
});
}
</script>
There are two things you can do:
1. Setup validation rules for the forms. See the documentation of the Validation plugin for jQuery on how to do that.
2. Make the nescessary checks inside the submitHandler function. If the checks succeed you make the AJAX request else not. This kind of defeats the presence of the Validation plugin though.
My advice is to take 1. as the way to this.
Caveat: Setting up the same validation rules for all forms like you did in your code example also means that all forms would have identical fields (at least the ones that are validated). This can make sense in some scenarios, but it is also possible that this is not what you wanted.
If you have any doubts, leave a comment to my answer.
Best Regards,
Manfred