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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T12:58:21+00:00 2026-05-28T12:58:21+00:00

Here is what I am seeing in my web console: validationRules.rules.NameOnCard.required //true document.OForm.NameOnCard.value //

  • 0

Here is what I am seeing in my web console:

validationRules.rules.NameOnCard.required //true

document.OForm.NameOnCard.value //""

$("#OForm").validate().element("#NameOnCard") //true

The field is required, it is empty, and it is valid. What am I doing wrong?

As a bit of background, I programmatically make payment info not required until the form shows a balance, then I make it required. If I remove that if/then code, it properly validates. But from what I can tell I am correctly telling validator that that field is now required, so an empty field should validate to false, yes?

  • 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-28T12:58:21+00:00Added an answer on May 28, 2026 at 12:58 pm

    Have your required parameter be conditional like this:

    NameOnCard: {
    required: function(element){
          var fooValue = $('#fooVar').val();
          if (isNaN( fooValue )){
              return false; 
          } else {
            if ( fooValue > 0) {
               return true;
            } else {
               return false;
            }
          }
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm seeing my Friend's code here... <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN> <HTML>
I'm seeing basically the same issue described here I have a table that starts
I always believe they did, but seeing some answers here make me doubt... Can
Here is my web service that works perfectly fine in Fiddler and in my
I'm seeing an intermittent problem on our web site. Some users are trying to
I feel like there must be something really simple that I'm not seeing here.
Here's what I've done: I wrote a minimal web server (using Qt, but I
I'm new here, and quite new to web development in general. My background is
Just seeking confirmation here : apache Thrift protocol does not seem to support running
Seeking help to design a layout as shown here: http://docs.google.com/Doc?docid=0AQhgDtGvE2HgZGZ6cmtua185MTd0eGdyZmc&hl=en The major challenge I

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.