Imagine the following FormGroup in Angular:
this.form = new FormGroup({
name: new FormControl(''),
age: new FormControl(),
hobbies: new FormArray([])
}, {
validators: [this.validateForm.bind(this)]
});
I am later adding hobbies in FormArray using:
this.form.controls.hobbies.controls.push(new FormControl(/* hobby */));
When I change values in name and age controls, the validateForm function is triggering fine. But when I click on either of the hobbies, aforementioned validation method isn't getting called.