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

I am using jquery uploader from here and I would like to know how
I know I can create a generic method that I can call from other
From the discussion started here , I'd like to know whether the following code
simple logic here, I don't know how I can separate the value from a
I'm talking about the performance increase here. From all I know you can echo
Something like: SELECT MONTH(*date?*) FROM //Not sure what goes here LIMIT 0,6 I know
I'd like to write a method that can accept a type param (or whatever
I can't figure out how to pass parameters coming from a form to a
I want to know how I can pass a variable from one page to
Cited from http://xss-proxy.sourceforge.net/Advanced_XSS_Control.txt : As many here probably know, current XSS attacks typically come

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.