Mac地址验证器Angular6,反应形式

时间:2019-01-22 03:09:52

标签: angular

我正在尝试在angular6中实现MacAddress验证器

this.phoneForm = this._formBuilder.group({
  oldMac: new FormControl('', Validators.compose([
    Validators.required,
    Validators.pattern('^[0-9a-f]{1,2}([\.:-])(?:[0-9a-f]{1,2}\1){4}[0-9a-f]{1,2}$')
  ])),
  newMac: ['', Validators.required],
  newModel: ['', [Validators.required]],
  targetCluster: ['', [Validators.required]],
  ownerUser: ['', [Validators.required]]
}, { updateOn: 'blur' });

但是在添加此验证器应用后,该应用未编译,给出错误:Module parse failed: Octal literal in strict mode (29:74) You may need an appropriate loader to handle this file type.

请帮助

0 个答案:

没有答案