jQuery Validate resetForm() doesn't reset the onFocus validation

前端 未结 2 1920
孤街浪徒
孤街浪徒 2021-01-06 12:30

I have a form that is using jQuery Validate plugin for client side validation, and submits via AJAX. After the form is submitted, I would like it to reset itself. I have u

2条回答
  •  甜味超标
    2021-01-06 13:06

    try this focusout()

    function resetMyForm() {
    
        $('#registerForm').resetForm();
        v.prepareForm();  // Tried adding this, no help
        v.hideErrors();  // Tried adding this, no help
        $("ElementName").focusout(); // focus out  which ever element you want
    

    }

提交回复
热议问题