title: Validate a textboth for lengh in angular in Angular form
body: <p>I want to validate if the length of data in a text box is either 7 or 10 digits.
  If it is not either of those, I want to throw an error message.</p>
  
  <pre><code>this.myForm = this.formBuilder.group({
    mytextBox: ['', [Validators.required, Validators.pattern('[0-9]{7}')]]
  });
  </code></pre>
  
  <p>The above pattern is working only if it is 7 digits, how do I add check if it is exactly 7 or 10 digits</p>