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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:23:35+00:00 2026-05-23T09:23:35+00:00

jQuery.validate stops my form from being submitted. I would like it to just show

  • 0

jQuery.validate stops my form from being submitted. I would like it to just show the user what is wrong but allow them to submit anyway.

I am using the jquery.validate.unobtrusive library that comes with ASP MVC.

I use jquery.tmpl to dynamically create the form and then I use jquery.datalink to link the input fields to a json object on the page. So my document ready call looks something like this.

jQuery(function ($) {
  // this allows be to rebind validation after the dynamic form has been created
  $("form").removeData("validator");
  $("form").removeData("unobtrusiveValidation");
  $.validator.unobtrusive.parse($("form"));

  // submit the answers
  $("form").submit(function(e) {
    $("input[name=jsonResponse]").val(JSON.stringify(answerArray));
    return true;             
  });
}

I note that there is an option

$("form").validate({ onsubmit: false });

but that seems to kill all validation.

So just to recap when my form is rendered I want to show all errors immediately but I don’t want to prevent the submit from working.

  • 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-23T09:23:36+00:00Added an answer on May 23, 2026 at 9:23 am

    So after some research (reading the source code) I found I needed to do 2 things

    add the class cancel to my submit button

    <input id="submitButton" type="submit" class="cancel" value="OK" />
    

    This stops the validation running on submit.

    To validate the form on load I just had to add this to my document ready function

    $("form").valid();
    

    Hope this helps someone else

    • 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 validate plugin to validate a multi-step form like this one:
I'm using jQuery Validate and would like to re-validate a group of fields whenever
i'm using jQuery validate() plugin to validate a form. it does the validation but
In jQuery error indication from jQuery.validate show near the input field and if this
I have a form on my jQuery Mobile site that I would like to
I'm using the jQuery.validate plugin to validate inputs for my user registration form. I've
I'm using jQuery validate on a form I am building and it is working
I'm using jquery validate to validate my forms. I want to show a text
I am using the jQuery validate plugin . My error labels are styled like
I'm using the fantastic jquery .validate plugin from Jörn Zaefferer at bassistance I'm using

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.