Angular · Middle · Question 36 of 75
Where should a "passwords must match" validator be attached?
- ✓Correct answer: To the
FormGroupcontaining both fields, because it compares their values - 2To each password control separately
- 3To the
<form>element as an HTML attribute
Explanation
A group-level validator receives the group and can read both controls. The error then appears in form.errors, not in the individual controls.