title: Angular pattern validation with regex
body: <p>I need to make a password pattern validator</p>
  
  <p>the password should have:</p>
  
  <ul>
  <li>1 uppercase letter </li>
  <li>1 lowercase letter </li>
  <li>A number </li>
  <li>A minimum length of 8.</li>
  </ul>
  
  <p>I found this regex pattern:</p>
  
  <pre><code>Validators.pattern('/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d!$%@#£€*?&amp;]')
  </code></pre>
  
  <p>however, the validator always claims my input is invalid</p>
  
  <pre><code>errors:    
     pattern:
        actualValue: "Test1234"
        requiredPattern: "^/^(?=.*[A-Za-z])(?=.*d)[A-Za-zd!$%@#£€*?&amp;]$"
  </code></pre>
  
  <p>according to <a href="https://regex101.com/r/AfAdKp/1" rel="noreferrer">https://regex101.com/r/AfAdKp/1</a> this value is supposed to be valid.</p>
  
  <p><strong>Edit:</strong> to clarify, Test1234 is supposed to work</p>