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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:37:59+00:00 2026-06-13T02:37:59+00:00

This errors driving me nuts, everything seems to be in order, but hopefully I’m

  • 0

This errors driving me nuts, everything seems to be in order, but hopefully I’m missing something simple.

Code in my aspx

        $('#myForm').validate({
            rules: {
                'ctl00$SecondaryPlaceHolder$txPayloadDate': {
                    required: true,
                    date: true
                },
                'ctl00$SecondaryPlaceHolder$ddlMapPlat': {
                    required: true
                },
                'ctl00$SecondaryPlaceHolder$txtBlock': {
                    maxLength: 3
                },
                'ctl00$SecondaryPlaceHolder$txtLeakNumber': {
                    number: true,
                    maxLength: 27
                },
                'ctl00$SecondaryPlaceHolder$txtHouseNumber': {
                    required: true,
                    maxLength: 10,
                },
                'ctl00$SecondaryPlaceHolder$txtStreet': {
                    required: true,
                    maxLength: 100
                },
                'ctl00$SecondaryPlaceHolder$txtCity': {
                    required: true,
                    maxLength: 50
                },
                'ctl00$SecondaryPlaceHolder$txtReading': {
                    isPositiveInteger: true,
                    maxLength: 100
                },
                'ctl00$SecondaryPlaceHolder$ddlInfoCodes': {
                    existsWithLowReading: true
                },
                'ctl00$SecondaryPlaceHolder$txtLocationRemarks': {
                    maxLength: 500
                },
                'txtGrade2RequestedRepairDate': {
                    date: true
                },
                'ctl00$SecondaryPlaceHolder$ddlEquipment': {
                    required: true
                }
            }
        });

custom validations

$.validator.addMethod("isPositiveInteger",
    function (value, element) {
        if($.trim(value) !== '')
            return /^\d+$/.test(value);
        return true;
    },
    "Must be a valid integer."
);


$.validator.addMethod("existsWithLowReading",
    function (value, element) {
        if (parseFloat($('#SecondaryPlaceHolder_txtReading').val() <= 2) && value.length < 1) {
            return false;
        }
        return true;
    },
    "Info Code required if Reading % is less than three."
);

Basically the issue is outside of the custom validations, but I threw them up here anyways…the form is validating fine when submitting, but there are a few ‘house number’ and ‘street’ that throw this error when trying to fill them in.

For example, I submit the form with an empty street number, the validation works, but when I fill in the input, on blur this error is being thrown.

The error is in jquery.validate here on the var rule = { method: method, parameters: rules[method] } line:

 check: function (element) {
            element = this.validationTargetFor(this.clean(element));

            var rules = $(element).rules();
            var dependencyMismatch = false;
            var val = this.elementValue(element);
            var result;

            for (var method in rules) {
                var rule = { method: method, parameters: rules[method] };
                try {

                    result = $.validator.methods[method].call(this, val, element, rule.parameters);

                    // if a method indicates that the field is optional and therefore valid,
                    // don't mark it as valid when there are no other rules
                    if (result === "dependency-mismatch") {
                        dependencyMismatch = true;
                        continue;
                    }
                    dependencyMismatch = false;

                    if (result === "pending") {
                        this.toHide = this.toHide.not(this.errorsFor(element));
                        return;
                    }

                    if (!result) {
                        this.formatAndAdd(element, rule);
                        return false;
                    }
                } catch (e) {
                    if (this.settings.debug && window.console) {
                        console.log("exception occured when checking element " + element.id + ", check the '" + rule.method + "' method", e);
                    }
                    throw e;
                }
            }

Thanks in advance for any pointers

  • 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-06-13T02:38:00+00:00Added an answer on June 13, 2026 at 2:38 am

    Dumb typo on my part was the culprit

    maxLength is not camel cased, and should be maxlength

    Although equalTo is camel cased…seems inconsistant, but glad I figured it out

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

Sidebar

Related Questions

This must be something simple but it's driving me nuts! I have a migration
This is probably a silly error, but it's driving me nuts trying to fix
This is driving me nuts. I have the following code that, when a button
This is driving me nuts. I have a simple spring app with just a
This is driving me nuts. I am using some 3rd-party code in a Windows
This is driving me nuts, I've tried everything for about a week. Hope some
This error is driving me nuts. Please help. The code compiles in gcc in
I want to create a PlayN game, but in Eclipse I get this errors:
NHibernate is driving me 'Nuts'!!! I have the following mapping. Which returns this error
This is driving me nuts! I'm getting some JSON from my server: {id262:{done:null,status:null,verfall:null,id:262,bid:20044,art:owner,uid:demo02,aktion:null,termin_datum:null,docid:null,gruppenid:null,news:newsstring,datum:11.06.2010,header:headerstring,for_uid:demo01}, id263:{done:null,status:pending,verfall:null,bid:20044,id:263,uid:demo02,art:foo,aktion:dosomething,termin_datum:11.06.2010,docid:null,gruppenid:null,datum:11.06.2010,news:newsstring,for_uid:demo01,header:headerstring},

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.