Here is my HTML:
<script type="text/javascript">
$(document).ready(function () {
$("#formTest").validate({
rules: {
Test: { required: true, digits: true }
}
});
});
</script>
<h2>
Index</h2>
<form action="#" method="post" id="formTest">
<input type="text" name="Test" id="Test" />
<input type="submit" value="Test" />
</form>
With Chrome, when I click on the submit button, the submit is cancelled and the message This field is required. is displayed.
But in IE7, this doesn’t work. When I click on the submit button… the form is submitted and no validation… 🙁
Why doesn’t this work?
This is my code and it works perfectly. I’m using the latest version of jquery validate.