Angular form validation: compare two fields in different form groups
问题 I'm sorry if it's a duplicate of someone question. I didn't find a solution for my problem. Can anybody explain or give an example how to compare two fields in one form but in different form groups? Here is code snippet to see how my form and validator are look like: private createForm() { const testGroups = { groupOne: this.fb.group({ fieldOne: this.fb.control(null) }), groupsTwo: this.fb.group({ fieldTwo: this.fb.control(null, [this.matchValidator]) }) }; this.testForm = this.fb.group