I initialize a formGroup like so
this.availableSigners = new FormGroup({
nameSigner: new FormControl(),
mailSigner: new FormControl()
});
and in my HTML component I have the following structure
<div *ngFor="let signer of signers; let i = index">
<div class="form-row">
<div class="card-body col-md-4" style="padding-top: 0.75rem !important">
<b>{{signer.name}} {{signer.surname}}
</b>
</div>
</div>
<div class="form-row" >
<div class="col-md-4">
<ng-select #mailDocumentSelect
formControlName="mailSigner" [items]="mails"
bindValue="code" bindLabel="description"
(click)="getMails()">
</ng-select>
</div>
<div class="col-md-4">
<ng-select>
</ng-select>
</div>
</div>
<br>
</div>
where "signers" is a list that gets populated by a click event to create a list of select mail options.
The issue arises when attempting to ensure that ALL "mailSigner" form control fields have a value.
I've created a function triggered by another button click:
getCompiledFeq(){
if(this.availableSigners.get('mailSigner').value){
return true;
}
return false;
}
However, this function currently returns true as long as there is at least one selected value (not validating all form controls).
How can I implement validation to check that every select form field is filled?