title: JavaScript password validation with space character
body: <p>I need a password validation with the following conditions using JavaScript. My conditions:</p>
  
  <ol>
  <li>at least  one digit from 0-9</li>
  <li>at least one lowercase character(s)</li>
  <li>at least one uppercase character(s)</li>
  <li>must contains at least one special character(s)</li>
  <li>length at least 8 characters and maximum of 20 </li>
  <li>Note : The Space bar also consider as a special character.</li>
  </ol>
  
  <p>I tried</p>
  
  <pre><code>(?=^.{6,10}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&amp;amp;*()_+}{&amp;quot;:;'?/&amp;gt;.&amp;lt;,' '])(?!.*\s).*$
  </code></pre>
  
  <p>But it doesn't work. Any other ideas?</p>