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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:07:29+00:00 2026-05-26T16:07:29+00:00

I am trying to get a simple ignore working for the JQuery validate and

  • 0

I am trying to get a simple ignore working for the JQuery validate and I dont seem to be able to get it to work. No matter what I do it seems to not use the options. I have trimmed the code down and pasted below.

I am using MVC3 Razor and JQuery 1.5.1

@Code
    ViewData("Title") = "Index"
    Layout = "~/Areas/Quote/Views/Shared/_Layout.vbhtml"
End Code
<script type="text/javascript">
    $(document).ready(function () {
        $('#myform').validate({
            ignore: "#textx"
        })
    });
</script>
@Using Html.BeginForm("Index", "YourQuote", FormMethod.Post, New With {.id = "myform"})
    @<input  type="text" id="textx" class="required"/>
    @<input type="submit" value="save" />
End Using

The example is simplified but what I really want to do is have an overriding rule which says ignore all hidden elements from validation. My page is dynamically built and removing class and adding them back in when parent elements are hidden or shown is not good for me

@Code
    ViewData("Title") = "Index"
    Layout = "~/Areas/Quote/Views/Shared/_Layout.vbhtml"
End Code
<script type="text/javascript">
    $(document).ready(function () {
        $('#myform').validate({
            ignore: ":hidden"
        })
    });
</script>
@Using Html.BeginForm("Index", "YourQuote", FormMethod.Post, New With {.id = "myform"})
    @<div style="display:none">
    <input  type="text" id="textx" class="required"/>
    </div>
    @<input type="submit" value="save" />
End Using
  • 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-26T16:07:29+00:00Added an answer on May 26, 2026 at 4:07 pm

    Try removing the unobtrusive jquery inclusion, and just include jquery.validate. I had a similar problem and somehow the unobtrusive library screwed up my custom defined settings

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

Sidebar

Related Questions

Trying to get this (simple!) jQuery expression to work in Mootools Jquery: checkCurrentModule =
I'm trying to get a simple jQuery color hover effect for a tags. You
I'm playing around a bit and trying to get some things to work for
I'm trying to profile a C++ application, that I did not write, to get
I'm trying to get my horizontal rule to ignore the parent padding. Here's a
I have the following template that I am trying to get working, I have
I'm trying to get simple option handling in my ruby app. Looks like OptionParser
I'm trying to get a PHP 5 application working on IIS7. This application appears
I am working on an iPhone app where we are trying to calculate the
I'm trying to write a simple bash script that accepts all arguments and interprets

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.