title: JQuery Validation is not validating
body: <p>I'm trying to use the JQuery validator plugin to validate a rails app but it's neither throwing any errors or validating anything. I don't know what else is wrong with my code--any help would be appreciated!</p>
  
  <pre><code>$(document).ready(function() {
  $(".theform").validate({
      rules: {
          name: {
              required:true,
              minlength:2,
              maxlength:50
          },
          email: {
              required: true,
              email: true,
              minlength:2,
              maxlength:50
          },
          phone_number: {
              required: true,
              phoneUS: true,
              minlength:9,
              maxlength:20
          }
      },
      messages: {
          name: {
              required: "Please provide your name",
              minlength: "Too few characters!",
              maxlength: "Too many characters!"
          },
          email: {
              required: "Please provide your email",
              email: "Your email address must be in the format of name@domain.com",
              minlength: "Too few characters!",
              maxlength: "Too many characters!"
          },
          phone_number: {
              required: "Please provide your phone number",
              phoneUS: "Please provide a valid US phone number",
              minlength: "Too few characters!",
              maxlength: "Too many characters!"
          }
      }
  });
  $("input#ajax").click(function() {
      $.ajax({
          type: "POST",
          url: "/create_user",
          data: {name: $('#name').val(), email: $('#email').val(), number: $('#phone_number').val(), ajax:"true"},
          success: function(msg){
              //console.log(msg.name);
              $("div#n").html(msg.name);
              $("div#e").html(msg.email);
              $("div#p").html(msg.phone_number);
          }
      });
  });
  });
  </code></pre>
  
  <p>EDIT: here's the form I'm trying to validate:</p>
  
  <pre><code>&lt;div id="theform"&gt;
  &lt;form name="form" action="create" method="post"&gt;
  
      Name: &lt;input type="text" name="name" id="name"/&gt;&lt;br/&gt;
      Email: &lt;input type="text" name="email" id="email"/&gt;&lt;br/&gt;
      Phone Number: &lt;input type="text" name="phone_number" id="phone_number" /&gt;&lt;br/&gt;
      &lt;input type="submit" value="Normal Submit" id="normal"&gt;
      &lt;input type="button" value="Ajax Submit" id="ajax"&gt;
  
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>