I have created form with FormArray like below mentioned
this.createModuleForm = this.fb.group({
artefactType: ['', Validators.required],
uploadDocuments: this.fb.array([]),
});
then I'm pushing the object into the FormArray
formArray.push(this.fb.group({name: event.name, url: event.url, submittedBy: 'siva', role: this.currentUser.value.role}));
Problem: If the uploadDocuments(FormArray) is empty, need to make Form is invalid and UploadDocuments should be mandatoary
FormArray.setErrors()to set your errors