title: Validate telephone number in Angular
body: <p>I am trying to validate telephone numbers in my Angular application. I have a form with a n input field. I am trying the following but am getting the below error.</p>
  
  <blockquote>
    <p>Invalid regular expression: /^(?:+?(61))? ?(?:((?=.*)))?(0?[2-57-8]))?
    ?(dd(?:- |(?!dd[- ]?d[- ]))dd[- ]?d[- ]?d{3})$/: Nothing to
    repeat</p>
  </blockquote>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="input-container"&gt;
  &lt;label for="mobile"&gt;Cell number*&lt;/label&gt;
  &lt;input id="mobile" type="text" formControlName="mobile" size="10" placeholder="000 000 000"&gt;
  &lt;/div&gt;
  &lt;p class="error"*ngIf="!userFormGroup.get('mobile').valid &amp;&amp; userFormGroup.get('mobile').dirty"&gt;
     * Invalid mobile number.
  &lt;/p&gt;
  </code></pre>
  
  <p>TS</p>
  
  <pre><code>mobile: new FormControl(null, [Validators.required, Validators.pattern('^(?:\+?(61))? ?(?:\((?=.*\)))?(0?[2-57-8])\)? ?(\d\d(?:[- ](?=\d{3})|(?!\d\d[- ]?\d[- ]))\d\d[- ]?\d[- ]?\d{3})$')])
  </code></pre>
  
  <p>I basically need to validate that the input has a minimum of 10 digits, allows for the + characters, excludes any white spaces</p>