I have an issue in validating multiple comma separated email address to one recipient field. I have no issue in validating one email. Any pointers are much appreciated. My code is below thanks.
html
<form ng-submit="onSend()" [formGroup]="sendEmailForm">
<div class="email-field">
<mat-form-field>
<input matInput #emailTo placeholder="to@company.ca, to@company.ca..." formControlName="toAddress">
</mat-form-field>
</form>
Typescript
ngOnInit() {
this.sendEmailForm = this.fb.group({
toAddress: new FormControl('', [Validators.email, Validators.required])
});
}
Will I have to write any custom validator?