I am NOT trying to get form validation, I already have validation via the HTML 5 "required" field. What I want to do is be able to control the styles of ".error" which is populated by jQuery validate when a user fails to enter in a field or gives invalid information. How can I control the style if it is not being populated by the jQuery validate function? OR, why does jQuery refuse to provide an error field?
http://jsfiddle.net/xvAPY/140/
$('#contactForm').validate({ // initialize the plugin
errorElement: 'div',
rules: {
first_name: {
required: true,
},
last_name: {
required: true,
},
postal_code: {
required: true,
},
phone_primary: {
required: true,
}
email: {
required: true,
}
},
submitHandler: function (form) { // for demo
alert('valid form submitted'); // for demo
return false; // for demo
}
});
phone_primary: {. Its missing a comma.