title: jquery validator - Name must contain at least two words (e.g. 'John Smith') in a single text field
body: <p>I am using jquery validator.</p>
  
  <p>I am having a text field and I want to apply validation as name shall not be <strong>john</strong> , it has to be <strong>john smith</strong> . please can anyone help how to add rule for the same. </p>
  
  <p>Here is the code for text field and rule</p>
  
  <pre><code>       name_on_card: {
              required: true,
              minlength: 2
          },
  
       &lt;input type="text" name="name_on_card" id="name_on_card"&gt;
  </code></pre>
  
  <p>can anyone suggest me in a single text field, how can i add validation so as it may accept two words.</p>
  
  <p>I have tried this method but didn't worked properly.</p>
  
  <pre><code>jQuery.validator.addMethod("math1", function(value, element, params) {
   return this.optional(element) || value == params[0] + params[1];
   }, jQuery.validator.format("Please enter the correct value for {0} + {1}"));
  </code></pre>