title: How to validate password strength with Angular 5 Validator Pattern
body: <p>I need to validate the strength of a password input form field. The requirements are:</p>
  <ul>
  <li>at least one lowercase char</li>
  <li>at least one uppercase char</li>
  <li>at least one number<br />
  (no matter the order)</li>
  </ul>
  <p>What I have searched and tried so far goes below, the results are inconsistent.</p>
  <p>It seems to validate the order of the regex validation.<br />
  What I need is to just check if at least one of the char &quot;types&quot; are present.</p>
  <pre class="lang-js prettyprint-override"><code>import { Component } from '@angular/core';
  import { FormBuilder, FormGroup, Validators } from '@angular/forms';
  
  @Component({
      selector: 'signup',
      templateUrl: './signup.component.html',
      styleUrls: ['./signup.component.scss']
  })
  export class SignupComponent {
  
      form: FormGroup;
  
      constructor() {
          this.init();
      }
  
      init() {
          this.form = this.fb.group({
              name: ['', [Validators.required]],
              email: ['', [Validators.required, Validators.email],
              password: ['', [
                  Validators.required, 
                  Validators.pattern('((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,30})')
              ]]
          }); 
      }
  }
  </code></pre>