title: jQuery validation select not equal to
body: <p>I have the following HTML code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="cs"&gt;
      &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;jQuery empty form&lt;/title&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.15.0/jquery.validate.js"&gt;&lt;/script&gt;
          &lt;script src="js/validate.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form action="" id="testform" method="post"&gt;
              &lt;fieldset&gt;
                  &lt;legend&gt;Osobní údaje:&lt;/legend&gt;
                  &lt;label for="firstname"&gt;Jméno:&lt;/label&gt;
                  &lt;input id="firstname" name="firstname" type="text" /&gt;&lt;br /&gt;
                  &lt;label for="surname"&gt;Příjmení:&lt;/label&gt;
                  &lt;input id="surname" name="surname" type="text" /&gt;&lt;br /&gt;
                  &lt;label for="gender"&gt;Pohlaví:&lt;/label&gt;
                  &lt;select form="testform" id="gender" name="gender"&gt;
                      &lt;option select="selected" value="select"&gt;Vyberte pohlaví&lt;/option&gt;
                      &lt;option value="man"&gt;Muž&lt;/option&gt;
                      &lt;option value="woman"&gt;Žena&lt;/option&gt;
                  &lt;/select&gt;&lt;br /&gt;
                  &lt;input id="confirm" name="confirm" type="submit" value="Potvrdit" /&gt;
              &lt;/fieldset&gt;
              &lt;div id="errors"&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and then following jQuery validation script</p>
  
  <pre><code>jQuery.validator.addMethod("notEqualTo", function(element, value, param){
      return this.optional(element) || value != param;
  });
  
  $(document).ready(function(){
      $("#testform").validate({
          onkeyup: function(element){$(element).valid()},
          onfocusout: false,
          errorLabelContainer: "#errors",
          wraper: "li",
          rules: {
              firstname: {
                  minlength: 3,
                  required: true
              },
              surname: {
                  minlength: 2,
                  required: true
              },
              gender: {
                  required: true,
                  notEqualTo: "select"
              }
          },
          messages: {
              firstname: {
                  required: "Zadejte své jméno&lt;br /&gt;",
                  minlength: "Jméno musí mít délku alespoň 3 znaky&lt;br /&gt;"
              },
              surname: {
                  required: "Zadejte své příjmení&lt;br /&gt;",
                  minlength: "Příjmení musí mít délku alespoň 2 znaky&lt;br /&gt;"
              },
              gender: {
                  notEqualTo: "Zvolte pohlaví&lt;br /&gt;"
              }
          },
      });
  });
  </code></pre>
  
  <p>I tried to do my first own jQuery method notEqualTo. But it doesn't work. I'd like to do that if the user has chosen option with value select, it means that he / she doesn't choose a gender. And if it's that situation the error message should appear.</p>