Class Is Not Being Added To The Error Element On First Check , But When Field Is Being Checked Again All Going Ok (jquery Validation Plugin)
Look my js and html code there: http://jsfiddle.net/2LRv7/2/ There are 1 problem. Don't write anything in inputs, just press submit button. There are error messages blocks appears
Solution 1:
You need to add the error class in errorPlacement
function
check this fiddle
errorPlacement: function (error, element) {
console.log(error);
var br = $( "<br>" );
error.insertAfter(element).addClass('message');
br.insertAfter(element);
}
Post a Comment for "Class Is Not Being Added To The Error Element On First Check , But When Field Is Being Checked Again All Going Ok (jquery Validation Plugin)"