Check out example codes for "mat input formatter tel". It will help you in understanding the concepts better.

Code Example 1

ngOnInit() {

    let MOBILE_PATTERN = /[0-9\+\-\ ]/;

    this.emailForm = new FormGroup({
      PhoneNumber:new FormControl('',[Validators.pattern(MOBILE_PATTERN)])
    });
}

Learn ReactJs, React Native from akashmittal.com