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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:52:54+00:00 2026-05-16T07:52:54+00:00

I am learning jQuery right now and am looking to validate form fields with

  • 0

I am learning jQuery right now and am looking to validate form fields with it.

The registration form in question is at http://taehee.pumpl.com/register.php

The basic code for the form field I made is:

<div id="register">
        <form action="">
        <fieldset>
        <legend>Register</legend>
        <ol>
            <li><label for="username">유저네임</label>
            <input id="username" name="username" size="32" type="text" ></li>
            <li><label for="email">이메일</label>
            <input id="email" name="email" size="32" type="text"></li>
            <li><label for="password">비밀번호</label>
            <input id="password" name="password" size="32" type="password"></li>
            <li><label for="password2">비밀번호 확인</label>
            <input id="password2" name="password2" size="32" type="password"></li></li>
        </ol>
        </fieldset>
        <input type="submit" value="Submit">
        </form>
    </div> <!-- register -->

I’ve loaded jQuery in the header using the following:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>

I also created a script with the following code:

$('#register').validate({
rules: {
    username: {
        required: true,
    },
    email: {
        required: true,
        email: true
    },
    password: {
        minlength: 4,
        required: true
    },
    password2: {
        equalTo: "#password"
    }
},
success: function(label) {
    label.text('OK!').addClass('valid');
}

});

Unfortunately, it doesn’t seem to work. I fill out the form and it doesn’t matter whether the fields are all wrong.

Can anyone help me? Thank you!

  • 1 1 Answer
  • 2 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-16T07:52:55+00:00Added an answer on May 16, 2026 at 7:52 am

    There are two small/easy-to-fix issues here. First as the comments state you need to include the validation plugin, for example:

    <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"></script>
    

    This pulls it from the Microsoft CDN, or grab and host from your site. The second issue is that .validate() works on <form> elements, so you need this instead:

     $("#register form")
    

    Or, give the ID to the <form> directly and use that selector.

    Here’s an updated version with both fixes in place, also jQuery has released 1.4.1 and 1.4.2, you may want to consider upgrading to get those bug fixes, just change the 1.4.0 in your src URL to 1.4.2.

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

Sidebar

Related Questions

I'm learning some AJAX right now and the jQuery function that is being used
I'd some experience in jquery but learning plugin creation right now. I've following javascript
I am new to jquery and still learning. The code I have right now
I'm still learning jQuery and what I'm trying to do right now is combining
Story so far.... Hello Stackoverflowers, me again! Right, im learning JQuery at the moment
I've just started learning Jquery but the examples aren't helping me much... Now whats
I am learning how to create a website using ASP.NET & C#. Right now
I'm in the process of learning JQuery, and I'm looking to have a list
im a php guy, right now im learning on making my first plugin heres
I am learning jquery and started my first attempt at building a form validation

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.