i need advice! I want validate reactive form. I have two form groups and both have input with same formcontrolname.
my code:
this.form = this.fb.group({
group1: this.fb.group({
name: ['', Validators.required],
}),
group2: this.fb.group({
name: [ '', Validators.required],
})
});
How cen i get both of name?
I tried this. But i dont know which one i get.
get name() { return this.form.get('name'); }
Thanks!