title: jQuery Validation Plugin not showing custom messages
body: <p>Tried to create a registration form similar to the <a href="http://jqueryvalidation.org/" rel="nofollow noreferrer">documentation example</a> but can't get it to work. In Chrome Inspector it says "jquery.validate.js:640 Uncaught TypeError: Cannot read property 'call' of undefined" but I can't understand that code. </p>
  
  <p>Actually the email field kind of works...<img src="https://i.stack.imgur.com/9eiVb.png" alt="enter image description here"></p>
  
  <p>Here is the HTML:</p>
  
  <pre><code>&lt;html&gt;
  
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Register&lt;/title&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/quickipedia.css"&gt;
          &lt;script src="http://code.jquery.com/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/jquery.validate.js"&gt;&lt;/script&gt;
          &lt;script src="js/register.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
  
      &lt;body class="q-site-background"&gt;
  
          &lt;div id="q-banner"&gt;&lt;/div&gt;       
  
              &lt;div id="q-login"&gt;
  
                  &lt;form class="form-horizontal" id="registrationForm" role="form" action="register.php" method="post"&gt;
                      &lt;div class="row"&gt;
                          &lt;div class="col-span-4 col-md-offset-4"&gt;
                              &lt;h2 class="form-horizontal-heading"&gt;Register&lt;/h2&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;br/&gt;
  
                      &lt;div class="form-group"&gt;    
                          &lt;label for="username" class="control-label col-sm-4"&gt;Username: &lt;/label&gt;
                          &lt;div class="col-sm-8"&gt;
                              &lt;input type="text" class="form-control" id="username" name="username" placeholder="Username" autofocus &gt;
                          &lt;/div&gt;  
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;    
                          &lt;label for="password" class="control-label col-sm-4"&gt;Password: &lt;/label&gt;
                          &lt;div class="col-sm-8"&gt;
                              &lt;input type="password" class="form-control" id="password" name="password" placeholder="Password" &gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;    
                          &lt;label for="confirm_password" class="control-label col-sm-4"&gt;Confirm Password: &lt;/label&gt;
                          &lt;div class="col-sm-8"&gt;
                              &lt;input type="password" class="form-control" id="confirm_password" name="confirmPassword" placeholder="Confirm Password" &gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;    
                          &lt;label for="email" class="control-label col-sm-4"&gt;Email: &lt;/label&gt;
                          &lt;div class="col-sm-8"&gt;
                              &lt;input type="email" class="form-control" id="email" name="email" placeholder="Email"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;    
                          &lt;label for="confirm_email" class="control-label col-sm-4"&gt;Confirm Email: &lt;/label&gt;
                          &lt;div class="col-sm-8"&gt;
                              &lt;input type="email" class="form-control" id="confirm_email" name="confirmEmail" placeholder="Confirm Email" &gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;button id="#register" class="btn btn-lg btn-primary btn-block q-button col-span-4" type="submit"&gt;Create Account&lt;/button&gt;
  
                &lt;/form&gt;
  
                &lt;br/&gt;
  
          &lt;/div&gt;  
  
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>And register.js:</p>
  
  <pre><code>$(document).ready(function() {
  
      $("#registrationForm").validate({
          rules:{
              username:{
                  required:true,
                  minLength:4
              },
              password:{
                  minLength:6,
                  required:true
              }, 
              confirm_password:{
                  minLength:6,
                  required:true,
                  equalTo:"#password"
              }, 
              email:{
                  required:true,
                  email:true
              },
              confirm_email:{
                  required:true,
                  email:true,
                  equalTo:"#email"
              }
          },
          messages:{
              username:{
                  required:"Please enter a username",
                  minLength:"Username must be at least 4 characters long"
              },
              password:{
                  required:"Please enter a password",
                  minLength:"Password must be at least 6 characters"
              },
              confirm_password:{
                  required:"Please confirm password",
                  minLength:"Password must be at least 6 characters",
                  equalTo:"Passwords do not match"
              },
              email:"Please enter an email",
              confirm_email:{ 
                  required:"Please confirm email",
                  equalTo:"Emails do not match"
              }
          }
      });
  });
  </code></pre>
  
  <p>I've checked over the syntax a billion times and can't find any errors. Also, it works if I include the HTML input attributes (e.g. required minLength="6" equalTo="#password") but that just shows the standard messages. I want to use the customized ones I've created but nothing shows up.</p>