1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
$('#form').validate({
errorLabelContainer:'#errorContainer',
showErrors: function(errorMap, errorList) {
if(errorList.length)
{
$('#errorContainer').html(errorList[0]['message']);
}
},
highlight:function(element,errorClass){
$(element).parent('td').addClass('error');
},
unhighlight:function(element,errorClass){
$(element).parent('td').removeClass('error');
}
})