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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:14:09+00:00 2026-05-25T03:14:09+00:00

I am using a fantastic jQuery validation plugin . It is working well with

  • 0

I am using a fantastic jQuery validation plugin. It is working well with a single form, but if I use divs into this form, it does not work (at least it works only for the first div).

I would like a three-column layout form (left, center & right div columns). Validations works well only in left (first) column. If I join all columns, it works again perfectly. It stops working after the first closing div… I would like to validate when the click submit button is clicked.

<script type="text/javascript">
    $(document).ready(function() {
        // Validate signup form on keyup and submit
        var validator = $("#form").validate({
            rules: {
                name: {required: true,},
                age:  {required: true,},
                city: {required: true,}
            },
            messages: {
                name: {required: "required"},
                age:  {required: "required"},
                city: {required: "required"}
            },
        });
    });
</script>

<div class="left">
    <form id="form" class="form" action="REGISTER.PRO" method="post">
        <input id="name" name="name" value="" type="text" class="name"/>
        </div>
        <div class="center">
            <input id="age" name="age" value="" type="text" class="age"/>
        </div>
        <div class="right">
            <input id="city" name="city" value="" type="text" class="city"/>
            <button>Register</button>
    </form>
</div>

How can I do this?

  • 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-25T03:14:10+00:00Added an answer on May 25, 2026 at 3:14 am

    You have invalid markup (wrongly nested divs) and invalid JavaScript code (trailing commas). Here’s how to fix it:

    <form id="form">
        <div class="left">
            <input id="name" name="name" value="" type="text" class="name"/>
        </div>
        <div class="center">
            <input id="age" name="age" value="" type="text" class="age"/>
        </div>
        <div class="right">
            <input id="city" name="city" value="" type="text" class="city"/>
        </div>
        <button>Register</button>
    </form>
    

    And JavaScript code:

    $("#form").validate({
        rules: {
            name: {
                required: true
            },
            age: {
                required: true
            },
            city: {
                required: true
            }
        },
        messages: {
            name: {
                required: "required"
            },
            age: {
                required: "required"
            },
            city: {
                required: "required"
            }
        }
    });
    

    And a live demo.

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

Sidebar

Related Questions

I am using the rather fantastic jQuery multiple select plugin, ASM select This plugin
I'm using the fantastic jquery .validate plugin from Jörn Zaefferer at bassistance I'm using
I am using this fantastic example of a jQuery editable invoice as a template
I have been using the fantastic jQuery library for quite some time and have
I am using the fantastic PrettyPhoto Lightbox, a Jquery lightbox clone. To launch a
I'm using jQuery along with the tablesorter plugin to sort a table. Everything is
I'm using a jQuery plugin called Cycle and I am having issues with the
I have been looking through this fantastic article: http://blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft/ While being fantastic, it is
ive searched around but couldnt really find anything to help. I use this code
I'm using fantastic MetaSearch by Ernie, but I'm having an annoying issue. In my

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.