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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:15:41+00:00 2026-05-13T22:15:41+00:00

I know from here that I can pass an ignore option in the jQuery.validate

  • 0

I know from here that I can pass an ignore option in the jQuery.validate method like this…

$('form').validate({
    ignore: ":hidden"
});

… which works fine, but I wanted to set the validator to ignore “:hidden” form fields by default… I’ve tried the following:

jQuery.validator.defaults.ignore.push(":hidden");

… but it doesn’t work.

To hide the form fields I’ve wrapped them in a div and I hide the div; which by default has “display: none” applied.

Anyone have any ideas?

Edit:
I’ve been wondering after a bit of a look in firebug, whether the “not()” method in jQuery is not meant to be able to take an array… which is what the jQuery.validator.defaults.ignore property is, or is it something else?

Edit 2
I’ve noticed that if I do this:

jQuery.validator.defaults.ignore = ":hidden";

it works… again, i think it might be that it is an array…

Results
It seems that using the code in Edit 2 above is not unreasonable as when you assign ‘ignore: “:hidden”‘ in the validate() method you are essentially doing the same things… What got me was that the item in the defaults is an array.

  • 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-13T22:15:41+00:00Added an answer on May 13, 2026 at 10:15 pm

    One of the overloads for .not() is .not([elements]), see here for details. The initial declaration of [] is passing an empty set of elements, leaving nothing for jQuery to remove. When you change the type to a string, you’re calling a different overload of .not()

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

Sidebar

Related Questions

Situation : C#, .NET 3.5, WinForms Objective : Form1 has a Button that can
I have a problem that can be simplified as follows: I have a particular
I'm trying to fix something in some Objective C++ (?!) code. I don't know
This time I have an error which I have been trying again to figure
I'm designing an application that will allow me to draw some functions on a
I'm having an issue with a rather intricate interaction of C++ and Python that
std::auto_ptr is broken in VC++ 8 (which is what we use at work). My
I'm currently working on a reasonably simple MVC app which allows the user to
I am making extensive use of boost:shared_ptr in my code. In fact, most of

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.