Answers for "jquery validation focus field on error"

0

jquery validation focus field on error

var validator = $("#test-form").validate({ /* settings */ });

$("#validate").click(function() {
      if ($("#test-form").valid()) 
              alert("Valid!");
      else
            validator.focusInvalid();
      return false;
});
Posted by: Guest on June-07-2021

Code answers related to "jquery validation focus field on error"

Code answers related to "Javascript"

Browse Popular Code Answers by Language