title: jquery validation remote - validate whether data in field or not
body: <p><strong>General Description</strong>:<br>
  In my form, I have a field that requires remote validation.  In the remote call, I send the value of the form element as well as the values of a couple other form elements on which this element may depend (used on the server for validation).</p>
  
  <p>The remote validation, when called, works great.  The problem is that the remote validation is only called when there is a value in the form element.  Depending on the params sent to the remote validation, this form element may be required or there may be other validation issues.</p>
  
  <p>How can I force the remote validation on this field whether it has data in it or not?</p>
  
  <p><strong>Specific Scenario</strong>:<br>
  Got a roles list, and a salesperson code text input.<br>
  Server side logic: (1) if salesperson role selected, salespersoncode required; (2) if salesperson role not selected, salespersoncode must be empty.</p>
  
  <p>Note that I do have other form element values I send to the server and there is other server side logic that I did not include here for brevity since they do not add value to this question and will only confuse things.</p>
  
  <pre><code>&lt;select name="roles" id="roles" multiple="multiple" size="5"&gt;&lt;/select&gt;
  &lt;input type="text" name="salespersoncode" id="salespersoncode" /&gt;
  
  $("#add_user_form").validate({
    rules: {
      salespersoncode: {
        remote: {
          type: "post",
          url: "/AdminJson/CheckSalespersonCode",
          dataType: "json",
          data: {
              salespersoncode: function () { return $("#salespersoncode").val(); },
              roles: function () { return $("#roles").val(); }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>I don't want to put in the "required" validation option because the salespersoncode field is not required in all situations.</p>
  
  <p>My question again: How can I force the remote validation on the salespersoncode field whether it has data in it or not?</p>
  
  <p>Thanks in advance</p>