I have several fields to be validated while creating a form in angular this is my code for creating form
requestForm = this.formBuilder.group({
requestorName: ['', [Validators.required]],
requestorEmail: ['', [Validators.required, Validators.email]],
componentSerialNumber: ['', [Validators.required, Validators.pattern("^[0-9]{5,}$")]],
componentType: [this.componentTypes[0]],
//componentId: ['', [Validators.required]],
macid:['', [Validators.required, Validators.pattern("^.{12}$")]],
dongleid:['', [Validators.required, Validators.pattern(/^(8-\w{8}|9-\w{10})$/)]],
vendorid:['', [Validators.required]],
details: ['']
});
I macid, dongleid and vendorid are basically types of Components in UI here

so I have created individual validators for above component types, is there any way we can group Component Type for validation? meaning if any of macid, dongleid or vendorid is validated the entire form should be considered validated and Submit button gets enabled.
here' html for submit button
<div class="field grid col-12">
<p-button class="col-1" label="Submit" styleClass="p-button-rounded p-button-warning" (onClick)="onSubmit()"
[disabled]="!requestForm.valid"
>
</p-button>
</div>
I have tried this way but it is not working
requestForm = this.formBuilder.group({
requestorName: ['', [Validators.required]],
requestorEmail: ['', [Validators.required, Validators.email]],
componentSerialNumber: ['', [Validators.required, Validators.pattern("^[0-9]{5,}$")]],
componentType: [this.componentTypes[0]],
//componentId: ['', [Validators.required]],
macid:['', [Validators.required, Validators.pattern("^.{12}$")]],
dongleid:['', [Validators.required, Validators.pattern(/^(8-\w{8}|9-\w{10})$/)]],
vendorid:['', [Validators.required]],
details: ['']
}, { validators: this.atLeastOneValidator });
atLeastOneValidator(control: FormGroup): ValidationErrors | null {
const macid = control.get('macid')?.valid;
const dongleid = control.get('dongleid')?.valid;
const vendorid = control.get('vendorid')?.valid;
if (macid || dongleid || vendorid) {
console.log("one validated ")
return null;
}
return { atLeastOneRequired: true };
};
!invalid), e.g. SO, or create a custom validators that take account two controls, e.g. SO, or create a customFormValidator over the whole formGroup link,