jQuery Validation fails on several fields
Hi,
the last couple of hours I tried to figure out why my JS-Code isn't running correctly and now you are my last chance...
I have several fields inside an ASP.NET-Form...
<fieldset>
<label>Stadt<span class="errortext"> *</span></label>
<input id="city" type="text" class="required" title="Bitte gib Deine Stadt an" />
</fieldset>
<fieldset>
<label>EMail-Adresse<span class="errortext"> *</span></label>
<input id="mailaddress" type="text" class="required email" title="Bitte gib eine gültige zentrale Mail-Adresse an" />
</fieldset>
... and one normal button, because I dont want to submit the form. I just want to run some Javascript...
<fieldset>
<div id="error" style="..."></div>
<input type="button" value="Senden" onclick="sendFormularRequest();" />
</fieldset>
The script...
function sendFormularRequest() {
var isValid = $('#aspnetForm').validate().form();
alert(isValid);
//more things to come...
}
I initialize the Validation as follows...
$(document).ready(function () {
$("#aspnetForm").validate({
errorLabelContainer: "#error",
errorElement: "span",
errorClass: "invalid",
onsubmit: false
});
});
The Form behaves like this:
1. I click the button and an error for the field 'city' occurs in the 'error'-Box. (Right)
2. I fill in some text in the city field
3. I click again on the button and no further validation is happening...!
Only when I focus the field 'mailaddress' an error is shown, BUT when I click the button once again the script says 'true', not 'false'!

I've tried a lot of options and methods, but always the same result...
I hope someone has a good idea...
Thanks
Kristof