title: jQuery form validate not working
body: <p>I've spent hours on this and I have no idea why this jquery validate() doesn't work. I finally broke it down to minimum and it still doesn't work. This is the actuall code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="jquery-1.8.2.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="jquery.validate.min.js"&gt;&lt;/script&gt;
  
      &lt;script&gt;
  
          $(document).on("click", "#submit", function() {
  
              $("#form").validate({
                  rules: {
                      input: { required: true}
                  },
                  messages: {
                      input: { required: "required" }
                  },
                  ignore:      "",
                  errorClass:  'fieldError',
                  onkeyup:     false,
                  onblur:      false,
                  errorElement:'label',
                  submitHandler: function() {                        
                      alert("alert");
                  }
              });
  
              return false;
           });
  
      &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;form id="form"&gt;
          &lt;input type="text" value="" name="input" id="input" /&gt;
      &lt;/form&gt;
      &lt;a href="#" id="submit"&gt;submit&lt;/a&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Am I missing something obvious here? I get no errors and nothing happens when "submit" is clicked.</p>
  
  <p><strong>UPDATE:</strong> I have moved the validate() outside the "click" event into document "ready" event and now it fires off when the document is loaded outputting message in the console "nothing selected, can't validate, returning nothing"
  This is not how I want it to work obviously, so how do I attach it to the click event?</p>
  
  <p><strong>UPDATE 2:</strong> Thanks to @NXT i finally make the validation run, however "submitHandler" is still not working and I need to use it to make Ajax call, because the form must be submitted without a page reload.</p>