I'm creating a form with Angular2 and I created two custom validators for email address field.
The first validator checks for email validity, the second (async) validator checks if email address already exists on database. In addition I would like to add a third validator for another verification.
Here is my code:
'email': ['', [validateEmail(), thirdValidator()], asyncValidator]
The behaviour that I want is the following: Only when the first validator validates the control, the second validator should start. And only when the second validator terminates then the third validator can start its validation.
How to reach this?