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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:54:53+00:00 2026-05-30T15:54:53+00:00

Actually I am using jquery validation plug-in to validate a form. In a form

  • 0

Actually I am using jquery validation plug-in to validate a form.
In a form I m using 3 dropdown list.
And I want
-> when I will choose a value in drop-downlist-1 ,the similar value in drop-downlist-2 and drop-downlist-3 shouldn’t be choosen atall.
and I want to be done by validation rule of validation plug-in.

can anyone solve my problem ?
Thanks in advance…

  • 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-30T15:54:55+00:00Added an answer on May 30, 2026 at 3:54 pm
    jQuery.validator.addMethod("dropdowns", function(value, element) {
    
              var drop_val1 = $('#drop_1').val();
              var drop_val2 = $('#drop_2').val();
              var drop_val3 = $('#drop_3').val();
    
    
              if((parseInt(drop_val1)==parseInt(drop_val2)) || (parseInt(drop_val1)==parseInt(drop_val3)) || (parseInt(drop_val2)==parseInt(drop_val3)))
              { 
                   return false;
              }
              else
             {
                  return true;
             }
    
    
      }, "can not have the same value in 2 dropdowns"); 
    

    then add it to your validation

                dropdown: {
                    required : true,
                    dropdowns: true
                }
    

    this should work

    EDIT

    this works for multiple dropdowns

                dropdown1: {
                    required : true,
                    dropdowns: true
                },
    
    
    
                dropdown2: {
                    required : true,
                    dropdowns: true
                },
    
    
    
                dropdown3: {
                    required : true,
                    dropdowns: true
                }
    

    dropdown1 , dropdown2 ,dropdown3 are your dropdown names

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

Sidebar

Related Questions

Actually, I want to validate the Canadian postal code form field using jQuery validation.
I am using jquery-ui tabs ...Actually i want to reset the form fields after
I am using jQuery validate and I don't want the form to validate when
I am using jQuery to create a client-side validation function for a .NET form.
I'm using jquery.validate plugin and facing the following situation: <form id=myForm ....> <input type=text
I'm using a g:select (actually, a g:currencySelect) in my view. I want a controller
I'm currently working on a very simple calendar using Jquery. Actually, We need a
I'm using jQuery to post a form to a php file, simple script to
We are using jquery validation plugin in our project. Recently we have upgraded our
I'm using jQuery on this site, which has form inputs. I'd like one particular

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.