I am trying to validate the input element with the id of phone, I have already validated the input element postcode successfully with required and minlength.
I have attached the second input field called number and the rules required and number, but it is not validating that the input into the form is a number. It is running the required check, but when I enter a letter the form allows this, which is not what I want it to do.
Please find the form here - http://www.bestclownintown.co.uk/book.php
here is the jQuery code, could my syntax be wrong? Any help is appreciated:
<script>
$(document).ready(function() {
$("#myform").validate({
rules: {
postcode: {required: true, minlength: 6},
number: {required: true, number: true},
}
});
});
</script>