I am using the jQuery.validate plugin but I would like to change the background color of the input field that has failed rather than displaying a message? Is there anything like this already built in to the plugin or will I need to add something to make it work?
Here's the code I have so far:
$("#myForm").validate({
debug: false,
rules: {
YourName: {
required: true,
},
},
//I want to highlight the failed element here by changing the background color
submitHandler: function(form) {
$.post('projectform.php', $("#myForm").serialize(), function(data)
{
$('#myDiv').html(data);
});
}
});