【发布时间】:2020-01-09 12:30:17
【问题描述】:
我需要确保 Angular 表单生成器,CityStateZip 包含逗号,1 个或多个逗号都可以。 Angular Formbuilder中的正则表达式验证器模式是什么,以确保它具有特殊字符?
this.editAddressForm = this.formBuilder.group({
'CustomerName': [null, [Validators.maxLength(50)]],
'UnitNumber': [null, [Validators.maxLength(50)]],
'StreetAddress': [null, [Validators.required, Validators.maxLength(50)]],
'CityStateZip': [null, [Validators.required, Validators.maxLength(50)]]
})
【问题讨论】:
标签: angular typescript angular-reactive-forms angular8