title: Problem with jQuery validate plugin (remote validation)
body: <p>I have a problem trying to validate a user value using the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="nofollow">jQuery Validation plugin</a>. </p>
  
  <p>The validation seems to fire correctly and call the web service function exactly as I want but, even if the server function does work correctly and returns a <code>true</code>/<code>false</code> result the field is always invalid.</p>
  
  <p>This is the validation code on the client side</p>
  
  <pre><code>$('#myForm').validate({
      errorContainer: container,
      errorLabelContainer: $("ol", container),
      wrapper: 'li',
      meta: "validate",
      rules: {
          Code: { required: true, maxlength: 15, remote: function () {
              return {
                  type: "POST",
                  url: GetBaseWSUrl() + 'MyService.asmx/IsValidCode',
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  data: JSON.stringify({ umltCode: $('#Code').val() })
              }
          }
          },
          Description: { required: true, maxlength: 255 },
          Notes: { maxlength: 255 }
      },
      messages: {
          // ... omitted for brevity
      },
      submitHandler: function (form) {
          saveObject(form);
      }
  });
  </code></pre>
  
  <p>Using fiddler I am able to see that a call is made to the server and that the server is returning a json <code>true</code>/<code>false</code> value depending on the case as in the following sample:</p>
  
  <pre><code>{"d":false}
  </code></pre>
  
  <p>or </p>
  
  <pre><code>{"d":true}
  </code></pre>
  
  <p>Despite this, the plugin still mark the field as invalid. Any suggestion?</p>
  
  <p><strong>EDIT</strong>: this is my server function</p>
  
  <pre><code>[WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  [ScriptService]
  public class MyService : System.Web.Services.WebService
  {
      [WebMethod]
      public object IsValidCode(string umltCode)
      {
          [...]
  
          if (u != null)
              return false;
  
          return true;
      }
  }
  </code></pre>