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

  • Home
  • SEARCH
  • 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 8353937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:24:29+00:00 2026-06-09T09:24:29+00:00

I have a simple signup form with the following jQuery validation code: $(document).ready(function(){ $(#registerForm).validate({

  • 0

I have a simple signup form with the following jQuery validation code:

$(document).ready(function(){

    $("#registerForm").validate({

    rules: {

    Username: {required: true, minlength: 6},   
    Password: {required: true, minlength: 6},
    re_Password: {required: true, equalTo: "#Password"} 

    },

    });     
});

It validates correctly before I submit the form.

The problem comes when I want to also do an AJAX submit of the form, because the form no longer validates and submits without validation:

<form id="registerForm" action="register.php" method="post" onsubmit="xmlhttpPost('register.php', 'registerForm', 'signup-box'); return false;">

The default that works is:

<form method="post" id="registerForm" action="register.php">

Please, if anyone can point me in the right direction or give me some starting points to solve this I would be grateful.

Thanks.


Thanks to Kundan Singh Chouhan I have found the solution adding the following code to the document.ready block:

$("#registerForm").submit(function(){

    if($("#registerForm").valid()){

        xmlhttpPost('register.php', 'registerForm', 'signup-box'); 

   }

return false;

});
  • 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-06-09T09:24:31+00:00Added an answer on June 9, 2026 at 9:24 am

    I think you should have to remove the onsubmit event from your form tag and write the below script in document.ready()

    $("form").submit(function(){
       if($("form").validate()){
          xmlhttpPost('register.php', 'registerForm', 'signup-box'); 
       }
       return false;
    });
    

    Hope this will fix your problem.

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

Sidebar

Related Questions

I have simple php validation form that is halfway working. If you leave the
Simple scenario: I have a signup form, with user name, password, email address, may
I have a simple login form, username and password. Basically, When a user is
I have a simple signup form that needs to track number of hits from
I have a simple user signup form with a checkbox that lets users get
Built a simple JQuery/Ajax newsletter signup form, then went back after the fact to
It is jQuery . I have a signup form. At the domain textbox field,
I have am using the jQuery validation plugin (1.8.1 from MS CDN) to validate
I'm doing a simple jQuery form checker for a website. I have two forms
I have a simple web form that feeds into Infusionsoft. Not my call. I

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.