jquery.validate error a is null
When I click into any of the inputs in my form i get the error a is null showing in the console log.
this is my form html code
- <div class="Contact-Form"
<form id="myForm">
<input type="text" id="name" placeholder="Your name..."/>
<br><br>
<input type="email" id="email" placeholder="Your email address..."/>
<br><br>
<textarea rows="10" cols="20" id="form" placeholder="Your message..."></textarea>
<br><br>
<div class="g-recaptcha" data-sitekey=" removed "></div>
<br><br>
<input type="submit"/>
</form>
</div>
This is my JS code
- $().ready(function() {
$('#myForm').validate({
rules: {
name: {
required: true
},
email: {
required: true,
email: true
},
form: {
required: true
}
},
messages: {
name: {
required: "<br/> You have not entered a name!",
minlength: "<br/> Your name must consist of atleast 2 characters",
},
email: {
required: "<br/> You have not entered an email address!",
email: "<br/> Please use a valid email address!",
},
form: {
required: "<br/> You have not entered a message!",
}
}
});
});
Can anyone point out where I am going wrong ?