title: HTML5 input pattern validate letters and numbers
body: <p>I need to validate password with these requirements:</p>
  
  <p>At least 1 Letter,
  At least 1 Number,
  Min 6 chars and Max 12 chars,
  Special characters not allowed.
  Here's what I have so far.</p>
  
  <pre><code>&lt;form&gt;
  Password: &lt;input type="password" name="pw" pattern="^(?=.*[a-zA-Z])(?=.*[0-9]).{6,12}$" title="Must contain at least one number and one letter, and at least 6 to 12 characters (special characters not allowed)"&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>