Put in order · Angular course · Module 8: Forms
Conditional validators
Order the steps for dynamically changing a field's validators in response to another field changing (execution order, line by line).
Items to put in order
- emailControl.setValidators([Validators.required, Validators.email])
- emailControl.clearValidators()
- emailControl.updateValueAndValidity()
You can check the correct answer by solving this task in the CodeWorlds game.