是否可以使用条件逻辑或条件逻辑声明表单组的验证器,以便至少有一个验证器为真? 喜欢:
this.fb.group({
inboundAdapter: ['', [Validators.required]],
inboundPort: ['993', [Validators.required]],
// here i want at least 1 rexexp is true
inboundHost: ['', Validators.pattern(this.domain_rexexp) || Validators.pattern(this.ip_rexexp)],
});