JQuery form validation error message view method

  • 2020-03-26 21:22:34
  • OfStack

JQuery form validation error, you can use the following way to see the specific input error message
 
If(!$( ' form').valid()) 
{ 
$($( ' form').validate().errorList).each(function (index, item) { 
Console.log($($(item).attr( ' element)).attr( ' name') +  '  ' + $($(item).attr( ' element)).attr( ' message')); 
}); 
} 

Related articles: