📜  mat 输入格式化程序 tel - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:29.136000             🧑  作者: Mango

代码示例1
ngOnInit() {

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

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