title: Custom jQuery Validator messages
body: <p>I'm having trouble validating a simple form, consisting of name and email fields, and getting custom error messages to show up. The email error messages seem to work, but for name I'm getting "This field is required." rather than the one I specified. </p>
  
  <p>Form HTML:</p>
  
  <p>Your Name:</p>
  
  <pre><code>&lt;div class="right"&gt;&lt;input type="text" id="alert_name" required/&gt;&lt;/div&gt;
  
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  
  &lt;div class="left"&gt;Your Email:&lt;/div&gt;
  
  &lt;div class="right"&gt;&lt;input type="email" id="alert_email" required/&gt;&lt;/div&gt;
  
  &lt;div class="clear:both;"&gt;&amp;nbsp;&lt;/div&gt;
  &lt;p id="errors" style="clear: both; margin-top:15px; text-align: center; color: red;"&gt;&amp;nbsp;&lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <p>$( "#basic-modal-content" ).dialog({
      autoOpen: false,
      width: 400,
      buttons: [
          {
              text: "Ok",
              click: function() {</p>
  
  <pre><code>            $("#email_alert_form").validate({
                  errorLabelContainer: '#errors',
                  messages: {
                      email: {
                          required: "Please enter an email address",
                          email: "Please enter a valid email address"
                      },
                      alert_name: 
                          required: "Please enter your name"
                      }
                  }
              });
  
              if (!$('#email_alert_form').valid()){
  
              } else {
                  var datastring = 'email_alert=' + 'true' + '&amp;name='+ $('#alert_name').val() + '&amp;email=' + $('#alert_email').val();
  
                  $.ajax({  
                    type: "POST",  
                    url: "process-contact.php",  
                    data: datastring,  
                    success: function(data) {  
                       $( "#submitted_alert" ).dialog( "open" );
                    }  
                  });  
                  $( this ).dialog( "close" );
              }   
          }
      }
  ]
  </code></pre>
  
  <p>});</p>
  
  <p>Any help would be much appreciated. </p>