this.billingForm = this.fb.group({
"fullname": [null, [Validators.required, Validators.pattern('.*\\S'), Validators.minLength(3)]],
"address1": [null, [Validators.required, Validators.pattern('.*\\S')]],
"address2": [null, Validators.pattern('.*\\S')],
"city": [null, [Validators.required, Validators.pattern('.*\\S')]],
"state": [null, Validators.pattern('.*\\S')],
"zipcode": [null, Validators.pattern('.*\\S')],
"country": [null, Validators.required],
"taxId": [null, [Validators.required, Validators.pattern('.*\\S')]],
"contacts": this.fb.array([this.contactDetail()], [Validators.required, Validators.pattern('.*\\S')])
});
Validators.pattern('。* \ S')不能与表单数组一起使用,并且可以用于其他控件。