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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:02:54+00:00 2026-05-15T13:02:54+00:00

I am using jquery-1.4.2 library and jquery.validate.js plugin to validate a very simple form.

  • 0

I am using jquery-1.4.2 library and jquery.validate.js plugin to validate a very simple form. In the head section, I have following code:

<script type="text/javascript" src="scripts/jquery-1.4.2.js"></script>
<script type="text/javascript" src="scripts/jquery.validate.js"></script>
<link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.2.custom.css"></link>
<script type="text/javascript" src="scripts/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript">
     $(document).ready(function(){
    // date pickers
    $('#birthdate').datepicker();
    $("#deliverydate").datepicker();

    //apply styles to buttons 
    $('input:button').button();

    // data validation
    $("#createAnimalForm").validate({
        debug: true,
        rules: {
            weight: {
                required: true
            }
        },
        messages: {
            weight: {
                     required: "Please enter a numeric value for weight."
                    }
        }
    });

});
function createClicked(){
    $("#createAnimalForm").validate().form();
}


</script>

In the body section, I have defined the form and the input field to accept the weight value. The code from body is as follows:

<form id="createAnimalForm">
<table cellpadding="5px">
<tr>
    <td>Weight:</td>
    <td><input type="text" name="weight" id="weight"></input>&nbsp;gms</td>
</tr>
<tr>
    <td></td>
    <td align="left"><input type="button" onclick="createClicked();" id="createButton" name="createButton" value="Create Animal"></td>
</tr>
</table>
</form>

When I load the page in firefox, I get the following error in firebug:

$("#createAnimalForm").validate is not a function

I searched on the net for a bit, but could not find any solution for this. I think I have the jquery library located at the correct location, and it appears that jquery-validation plugin is compatible with jquery-1.4.2.

Any ideas on what I am doing wrong?

Thanks,
Nikhil.

  • 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-15T13:02:54+00:00Added an answer on May 15, 2026 at 1:02 pm

    You don’t quite have it right when you are setting up validate. Try:

        // data validation
    $("#createAnimalForm").validate({
        debug: true,
        rules: {
            weight: {
                required: true
            }
        },
        messages: {
                weight: {
                  required: "your message here"
                }
        }
    });
    

    Then use:

    if ($('#createAnimalForm').validate().form()) { ... }
    

    Wherever you want to trigger validation.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Cheers for trying to help Jon. I tried to simplify… May 16, 2026 at 8:05 am
  • Editorial Team
    Editorial Team added an answer You want to do <%: Html.CheckBoxFor(Function(model) model.Discontinued, new { disabled… May 16, 2026 at 8:05 am
  • Editorial Team
    Editorial Team added an answer There is diferent levels of options. To edit syntax highlighting… May 16, 2026 at 8:05 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.