Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7249079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:14:38+00:00 2026-05-28T22:14:38+00:00

I have a form that is using jQuery Validate plugin for client side validation,

  • 0

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 used the .resetForm() method to reset the fields, which works, but the problem is that the validate plugin still immediately tries to validate fields when they’re focused, and gives an error before giving the new submission a chance to enter their input.

Example Flow:

  • Trigger validation initially
  • Fix Validation, submit form via AJAX
  • Call .resetForm(), fields are successfully cleared out
  • Attempt to fill out form again
  • Focus on a field (which in my case has email validation)
  • Before giving you a chance to enter input, it validates and says it is incorrect.

Typically the plugin will let your enter your input before telling you that it’s incorrect. Is there any way to truely reset the form and not have the validation occur on focus again, without turning off on focus validation all together?

Thanks, and here’s a cleaned up/simplified code samples!

    // Validation
    $('#registerForm').validate({
        submitHandler: function(form) {

            $(form).ajaxSubmit({
                success: function(response) {

                    if( response == 'success' ) {
                        resetMyForm();
                    }
                    else {
                        alert('unsuccessful');
                    }

                }
            })
        }
    });

})




function resetMyForm() {

        $('#registerForm').resetForm();
        v.prepareForm();  // Tried adding this, no help
        v.hideErrors();  // Tried adding this, no help

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T22:14:39+00:00Added an answer on May 28, 2026 at 10:14 pm

    You need to reset the form and run the Validation plugin method resetForm like this:

    var v = $("form").validate({
        submitHandler: function(form) {
                //resetForm is a method on the validation object, not the form
                v.resetForm(); 
                form.reset();
        }
    });
    

    That seemed to take care of any issues I saw while following your workflow. See this: http://jsfiddle.net/nxXNz/27/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mixed client-side/server-side validation using jQuery validation plugin. The validation happens on
I am using the jquery validation plugin to validate a form. I have the
I'm using the jQuery plugin Validation to validate a form. I have a select
I have a form that validates using the jQuery plugin: Validation, v1.9.0. The validation
I'm using the jQuery validation plugin found here: http://plugins.jquery.com/project/validate In my form I have
I have a simple html form that I've added validation to using the JQuery
I am using the jQuery Validation plugin and have an issue validating items that
I am Using jquery validate() plugin . i hava a combobox in form that
I have a form that uses the validation plugin, but I need to validate
I'm using the jQuery validation plugin to validate a form. The form fields are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.