I'm trying to do custom validation and I need to add new validators during runtime. This can be accomplished using
control.setValidators([control.validator, newValidator.toValidatorFn])
where control is instance of AbstractControl.
OK, so far all fine and dandy. However, I would like to check if the validator I'm adding has been already added. I also would like to later locate the validator I added to manipulate it further.
So the question is: how can I iterate through the validators that are attached to certain AbstractControl instance?