My input field is
<input type="text"
class="form-control"
name="locphone"
[(ngModel)]="locmodel.locphone"
#locphone="ngModel"
[ngClass]="{ 'is-invalid': f2.submitted && locphone.invalid }"
required
locphone
pattern="^\s*(?:\+?\d{1,3})?[- (]*\d{3}(?:[- )]*\d{3})?[- ]*\d{4}(?: *[x/#]\d+)?\s*$" />
Phone number should be in phone number format 999-999-9999
Here how to change the pattern to support this format alone?