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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:20:09+00:00 2026-05-27T14:20:09+00:00

with version 1.7 everything works ok, all hidden inputs get validated, but with version

  • 0

with version 1.7 everything works ok, all hidden inputs get validated,
but with version 1.9 some do and some don’t
I use asp.net mvc 3 and jquery.validate + jquery.unobtrusive (jquery 1.7.1)

this is the generated html:

    <!--this gets validated-->
        <input type="hidden" data-val="true" data-val-number="The field Chef must be a number." data-val-required="The Chef field is required." value="" name="Chef" id="Chef">    
<span data-valmsg-replace="true" data-valmsg-for="Chef" class="field-validation-valid"></span>

    <!--this one is ignored-->
        <input type="hidden" data-val="true" data-val-number="The field MyFruit must be a number." data-val-required="The MyFruit field is required." value="" name="MyFruit" id="MyFruit">
<span data-valmsg-replace="true" data-valmsg-for="MyFruit" class="field-validation-valid"></span>

anybody knows why could this happen ?

  • 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-27T14:20:09+00:00Added an answer on May 27, 2026 at 2:20 pm

    With 1.9 version validation plugin ignores :hidden elements by default.

    Another change should make the setup of forms with hidden elements
    easier, these are now ignored by default (option “ignore” has
    “:hidden” now as default). In theory, this could break an existing
    setup. In the unlikely case that it actually does, you can fix it by
    setting the ignore-option to “[]” (square brackets without the
    quotes).

    Because you’re using unobtrusive version, you can’t set any option. So you don’t init plugin yourself, therefor you have to change it’s setting after it’s initialized. You can fix it like this:

    var validatorSettings = $.data($('form')[0], 'validator').settings;
    validatorSettings.ignore = "";
    

    This code works for first form element in the markup, you can specify your form(s) and change default behaviour.

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

Sidebar

Related Questions

I'm learning to work with SVN using Visual Studio.NET. Everything works fine and all
I am working on a Asp.Net MVC 3/knockout.js site for several users where they
We generally use two different hosting services. On one, everything works ticketyboo, as it
I am streaming a PDF to the browser in ASP.NET 2.0. This works in
Everything works fine in all browsers excluding Internet Explorer 6. png images shows white
I have the very same delphi version, bpls, components, everything. And yet in three
Short version: assuming I don't want to keep the data for long, how do
I follow the installation guide at http://golang.org/doc/install.html , at first everything goes well, but
I have a contact form on my website, and everything works like a charm.
I'm using JQuery 1.4.2 for an accordion effect on my website. All but one

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.