title: How to combine messages for specific conditions?
body: <p>This is the validation code I have written which validates whether the username and password has been entered individually.</p>
  
  <pre class="lang-js prettyprint-override"><code>$('form').validate({
      messages: {
          username: " Please enter a username.",
          password: " Please enter a password.",
      },
      errorPlacement: function (error, element) {
          error.appendTo(".error-message");
      }
  });
  </code></pre>
  
  <p>How do I display a combined message if both username and password are not entered?
  Eg: <code>Enter a username and a password.</code></p>