I am working with a dynamic FormGroup and I need to add an error to a form control programmatically. However, the current method I know of replaces any existing errors as shown below:
this.userForm.controls.username.setErrors({
'exists': 'Username already exists'
});
Is there a way to append a single error to a dynamic FormGroup control without replacing existing errors?