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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:47:22+00:00 2026-06-07T03:47:22+00:00

I am using jQuery Validate to make sure an entered report number is valid

  • 0

I am using jQuery Validate to make sure an entered report number is valid in a SQL database. I am doing this with an asmx web service that is returning a true/false boolean when passed the report number. The web service is working fine and is returning a JSON encoded response like one of the following:

<?xml version="1.0" encoding="UTF-8"?>
<boolean xmlns="http://tempuri.org/">true</boolean>

or

<?xml version="1.0" encoding="UTF-8"?>
<boolean xmlns="http://tempuri.org/">false</boolean>

However, when I try to call it in the following jQuery it keeps returning [object Object] instead of the true/false boolean like I am expecting.

$(function() {
        $("#form1").validate({
            rules: {
                tbAuto: {
                    remote: function () {
                        var r = {
                            url: "ReportList.asmx/ValidateInReports",
                            type: "POST",
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            data: "{'ReportNumberSearch': '" + $('#tbAuto').val() + "' }",
                            dataFilter: function (data) { return (JSON.parse(data)).d; }
                        }
                        $("#txtID").val(r);
                       // return r;
                    }
                }
            },
            messages: {
                tbAuto: { remote: "check" }
            }
        });
    });

I have commented out the return line and returned it to the textbox just to see what it was returning. When the return r; was in their it was acting as though it was returning true all the time.

This is not currently in my life application, just trying to get it to work in a test environment. This is my test code that goes with the jQuery above:

<form id="form1" runat="server">
  <div class="demo">
   <div class="ui-widget">
     <label for="tbAuto">Report Number: </label>
      <asp:TextBox ID="tbAuto" class="tb" runat="server">
      </asp:TextBox><br />
     <label for="txtID">ID: </label>
      <asp:TextBox ID="txtID" CssClass="tbb" runat="server" />
   </div>
  </div>
</form>

Thanks in advance for any thoughts or suggestions.

  • 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-07T03:47:24+00:00Added an answer on June 7, 2026 at 3:47 am

    I ended up going a completely different route using the blur instead of validation. I had trouble with this as well, but eventually was able to figure it out. The post with the resolution can be found here.

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

Sidebar

Related Questions

I'm currently using this jQuery validate plugin and having an issue in IE where
I'm using the jQuery validate plugin to validate a multi-step form like this one:
I'm using the following rule in jquery validate to make a name field, called
I'm using jquery validate to validate my forms. I want to show a text
I'm using jQuery Validate and would like to re-validate a group of fields whenever
I am using jQuery validate for client side validation and I want to ignore
I'm using jQuery Validate plugin and store Error messages in title, e.g.: <input type=text
I have the following code using jQuery Validate. $(#register).validate({ debug: true, errorClass:'error', validClass:'success', errorElement:'span',
I need to be able to validate fractions on my form using jquery.validate and
I am using the jQuery validate plugin . My error labels are styled like

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.