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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:27:44+00:00 2026-05-14T21:27:44+00:00

I’m using the jQuery validation plugin from bassistance.de. It works fine. From <head> :

  • 0

I’m using the jQuery validation plugin from bassistance.de. It works fine.

From <head>:

<script type="text/javascript" src="/static/JQuery.js"></script>
<script type="text/javascript" src="/static/js-lib/jquery.validate.pack.js"></script>
<script type="text/javascript" src="/static/js-lib/jquery.validate.additional-methods.js"></script>

At first, this was the only validation code I had, and it worked:

$("form").validate();
$("#form-username").rules("add", {
    required: true,
    email: true,
});

It was validating this HTML:

            <form id="form-username-form" action="api/user_of_email" method="get">
                <p>
                <label for="form-username">Email:</label>
                <input type="text" name="email" id="form-username" />
                <input type="submit" value="Submit" id="form-submit" />
                </p>
            </form>

Great, everything works. But then I add this JS:

$("#form-choose-options input[type='text']").rules("add", {
    number: true,
});

to validate this markup:

            <form id="form-choose-options" action="api/set_options" method="get">
                <p>
                    <label for="form-min-credits">Min credits per term:</label><input type="text" name="min_credits" id="form-min-credits" /> <br />
                    <label for="form-optimal-credits">Optimal credits per term:</label><input type="text" name="optimal_credits" id="form-optimal-credits" /> <br />
                    <label for="form-max-credits">Max credits per term:</label><input type="text" name="max_credits" id="form-max-credits" /> <br />
                    <label for="form-low-GPA">Lowest acceptable GPA:</label><input type="text" name="low_GPA" id="form-low-GPA" /> <br />
                    <label for="form-high-GPA">Highest realistic GPA:</label><input type="text" name="high_GPA" id="form-high-GPA" /> <br />
                    <input type="hidden" class="user-pk" name="pk"/>
                    <input type="submit" value="Submit" />
                </p>
            </form>

This causes a javascript error on document load:

$.data(f.form, "validator") is undefined

The error is from the packer function.

What am I doing wrong?

  • 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-14T21:27:45+00:00Added an answer on May 14, 2026 at 9:27 pm
    $("form").validate();
    $("#form-username").rules("add", {
        required: true,
        email: true,
    });
    

    You have trailing commas in your objects. Eliminate the last comma in your object definitions and everything should work fine.

    $("form").validate();
    $("#form-username").rules("add", {
        required: true,
        email: true //Comma removed
    });
    

    And your other object…

    $("#form-choose-options input[type='text']").rules("add", {
        number: true //Comma removed
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 388k
  • Answers 388k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you want to keep the permissions on files then… May 15, 2026 at 12:19 am
  • Editorial Team
    Editorial Team added an answer I think the only hidden wiring in view controllers is… May 15, 2026 at 12:19 am
  • Editorial Team
    Editorial Team added an answer MD5 are diffrent. Strcmp gives -1, "==", and "===" return… May 15, 2026 at 12:19 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.