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 7000483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:40:39+00:00 2026-05-27T20:40:39+00:00

I am using jquery validation 1.9.0. I have used the latest Jquery and on

  • 0

I am using jquery validation 1.9.0. I have used the latest Jquery and on back to 1.6.0. with no change in result

My problem is this: When I deliberately put in the wrong values (not enough characters etc) the validation script rightfully shows the errors yet allows the script to be submitted anyways.
I have tried methods of validation including add rules, rules and the very simple form type below.

<script>
jQuery.validator.setDefaults({
debug: true,
success: "valid"
});
</script>

<script>
$(function() {    
$("#comm").validate();

});
</script>

the form

<form action="comm.php" method="post" name="comm" id="comm">
Name: <input type="text" name="name" id="name"  minlength="3" class="required"  /> 
Email:<input type="email" name="email" id="email" class="required email" /> <br />
<label for="comment"> Comment </label> <br />

<textarea name="comment" id="comment" cols="80" rows="5" minlength="6" class="required" /></textarea> 
<?php
 date_default_timezone_set('America/New_York');
 $date = date("Y-n-j h:i:s");?>

 <input type="hidden" name="date" id="date" value="<?php echo $date; ?>" /> 
 <?php $post_id = $id;?>
 <input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" /> 
 <?php $ip = $_SERVER["REMOTE_ADDR"]; ?>

 <input type="hidden" name="ip" id="ip" value="<?php echo $ip; ?>" /> 

 <input type="submit" value="Post" name="post" id="post" /> <input type="reset" value="Reset Form" name="reset" id="reset" />
</form> 

Very simple stuff.

Submission happens on all my forms on the net, and all of them on localhost. I can always detect errors but never stop them. What am I doing wrong?

Firebug shows me submitting properly and no script errors. Also all jquerys are connected. Firebug also shows me this After submission novalidate=”novalidate” in the form html. using onsubmit=return false does not change anything

I am using ajax to submit the form, works flawlessly

$(function() {
    $("#comm").submit(function() {      
      var data = $('#comm').serialize();
      alert (data); return false;


        $.ajax({
            url: "comm.php",
            data: data,
            type: "POST",
            success: function(msg){
                if(msg){
                    $('.comme').prepend().html(msg).show();
                }else{
                    $('.comme').text("nothing came back");
                }
            }
        });
        return false;
    });
});

Thank you

  • 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-27T20:40:40+00:00Added an answer on May 27, 2026 at 8:40 pm

    Try to do your Ajax handling after clicking the submit button instead of doing with jQuery form submission perhaps you’re submitting the form data through Ajax only.

    $(function() {
      $("#post").click(function() {
        var data = $('#comm').serialize();
    
        // TODO: validate your data - $("#comm").validate();
    
        // TODO: submit your form though ajax
    
        // Other operations on form data
    
        return false;
      });
    });
    

    Note: If the form submission is happening with page redirection then try with ‘onsubmit=return false;’.

    Update:

    I seems you’ve to submit the FORM from the validate function’s submit callback handler(submitHandler) to avoid the redirection after submission. Please try to check this demo example which is working fine with Ajax form submission, review the source code of this example page and then adjust your code accordingly.

    var v = jQuery("#form").validate({
      submitHandler: function(form) {
        jQuery(form).ajaxSubmit({
          target: "#result"
        });
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the jQuery Validation JS I have two contact forms, the main one
I am using jquery validation plugin for form validation. I have added a custom
I'm using (or trying to) JQuery Validation with WebForms/html. I have, basically (simplifying the
My latest project is using a javascript framework (jQuery), along with some plugins (validation,
I have a form that is using jQuery Validate plugin for client side validation,
hope you can help me on this one, I'm currently using this: jQuery plugin:validation
I am using this form validator (http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/) and am having issues getting it to
Have a script that using jquery validation. Tested on 2 Blackberry's and neither worked
I have a form using jquery validation plugin. My submit button has an ajax
I am using JQuery validation plugin to validate my form. I have a radio

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.