title: How to add validation rules with messages in jQuery validation?
body: <p>I've tried below code but can't get error messages.</p>
  
  <pre><code>var v = jQuery("#account_info").validate({
      //errorLabelContainer: $("#result"),
      submitHandler: function(form) {
          jQuery(form).ajaxSubmit({                               
             target: "#checkOut_error",                   
              success: function(msg) {
                  //setTimeout("window.location='MyBids.php'", 2000);             
                  if(msg == '&lt;?php echo OBJECT_STATUS_SUCCESS;?&gt;')    {
                      $('#checkOut_error').html('&lt;div class="msg msg-thanks"&gt;Bid Submitted Successfully !&lt;/div&gt;');
                      //setTimeout("window.location='"+&lt;?php echo LINK_TO_TENBID;?&gt;+"'", 2000);
                      //setTimeout("window.location.reload(true)",2000);
                     //$('.result').html('&lt;div class="msg msg-thanks"&gt;Bid Submitted Successfully !&lt;/div&gt;');
  
                  } else{
                                          $("#checkOut_error").html(msg);
                                      }
              },
              clearForm:  false,
              resetForm:  false
          });
      },
             errorLabelContainer: "#checkOut_error",
            rules: {
                  phone_number: {
                      required: true
  
                  },
                  recipient_name: {
                      required: true,
                      min_length: 6
                  }
  
            },
            messages: {
                  recipient_name: {
                      required: "Enter recipient name",
                      min_length: "Name should be atleast 6 characters long"
                  }
            }
   });
  </code></pre>
  
  <p>-How to add rules and error messages?</p>
  
  <p>-Which attribute does validation plugin uses: name or id?</p>
  
  <p>-How to show one error message at a time?</p>