I want the formControl to have a updateOn: 'change' behavior, but only once the user has ended typing and it turns to be invalid.
This is how my formGroup looks like:
controlValidation = '^((?!-)[A-Za-z0-9-]' + '{1,63}(?<!-)\\.)' + '+[A-Za-z]{2,3}';
campaignForm: FormGroup = this.formBuilder.group(
{ control: [null, Validators.pattern(this.controlValidation)]},
{ updateOn: 'blur' }
);
And the template looks something like this
<div class="form-group">
<input type="text" formControlName="advertiserDomain" />
<div *ngIf="campaignForm.get('control').invalid">
Error message that should only display reactivly BUT only once the user finished writing for the first time
</div>
</div>