title: Error response from jQuery Validate remote isn't working
body: <p>I am using the <code>remote</code> method of <a href="http://jqueryvalidation.org/" rel="nofollow noreferrer">jQuery Validation</a> to check if a username already exists in the system. The script <code>does_user_exist.php</code> returns <code>1</code> if the user exists. </p>
  
  <pre><code>$registration.find(".username").each(function() {
      var $this = $(this);
      $this.rules('add', {
          remote: {
              url: "does_user_exist.php",
              type: "post",
              dataType: "json",
              data: {uname: function(){ return $this.val(); } },
              async: false,
              success: function (data) { //returns 1 if user exists
                  if (data) {
                     console.log("false!");
                     return "Sorry, that user already exists." //doesn't work
                     //return false;        //doesn't work
                     //return data;         //doesn't work
                     //return {"string"};   //doesn't work
                     //return {0: "string"};//doesn't work
                  } else {
                     console.log("true!");
                     return true;
                  }
              }
          },
          messages: {
              remote: jQuery.format("{0}") //doesn't work
              // remote: "Simple string doesn't work here either"
          }
      });
  });
  </code></pre>
  
  <p>My problem is that the error message is never displayed. I can see from my <code>console.log</code> output that it correctly logs <code>false!</code> when the user exists, but the error message never shows up.</p>
  
  <p>As you can see from the commented out lines, I've been trying to figure out what exactly I'm doing wrong via guess-and-check, on the assumption that I'm somehow returning the error string in the wrong format, but I'm not having success.</p>
  
  <p><strong>Edit3:</strong>
  I was able to get the backend response to be changed. The PHP is now sending JSON encoded <code>true</code>/<code>false</code>, to no avail. We have tried sending the backend response in the following ways, but the plugin doesn't seem to be catching it no matter what we do:</p>
  
  <pre><code>json_encode( false )
  json_encode( '["false"]' )
  json_encode( "false" )
  json_encode( ["false"] )
  "false"
  false
  NULL
  ""
  0
  </code></pre>
  
  <p>As far as I can tell based on the documentation, one of these should have worked: </p>
  
  <blockquote>
    <p>The response is evaluated as JSON and must be true for valid elements,
    and can be any false, undefined or null for invalid elements, using
    the default message;</p>
  </blockquote>
  
  <p>Note, the answer to this question may be related to <a href="https://stackoverflow.com/q/19435906/925897">this issue</a>. </p>
  
  <p>Here is the revised code:</p>
  
  <pre><code>$registration.find(".username").each(function() {
      var $this = $(this);
      remote: {
          url:  "does_user_exist.php",
          type: "post",
          data: {entityExistence: function(){return $this.val();} },
          success: function(data){ console.log(data); }
      },
      messages: {
          remote: "Sorry, that username is not available."
     }
  });
  </code></pre>
  
  <p>The PHP script is always returning <code>true</code> or <code>false</code> correctly. According to the documentation, anything except for <code>true</code> should trigger the error message. But the error message doesn't come up. I know error messaging is working because there are other checks are working fine (e.g. <code>rangelength</code>, removed from pasted-in code here for clarity).</p>