1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

jquery validate plugin, show only one error at a time

$('#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');
}
})
Share:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Reddit
  • RSS
  • Slashdot
  • StumbleUpon
  • Twitter
  • Yahoo! Bookmarks
Share your opinion! Post your thoughts.