title: how to check if 2 fields are equal in angular 4
body: <p>i am developing a application in angular 4. there i have a small form. validations are working fine. but i want to verify that both passwords and the password confirm fields are same.</p>
  
  <pre><code>    registerUser = this.fb.group({
       name: new FormControl(this.data.name, Validators.required),
       email: new FormControl({value: this.data.email, disabled: true}, [ 
              Validators.required,
              Validators.email,
              this.valdaitionService.emailDomainValidator
          ]),
       emailp: new FormControl(this.data.emailp,Validators.email),
       designation:new FormControl({value: this.data.designation, disabled: true}, Validators.required),
       empType:new FormControl({value: this.data.empType, disabled: true}, Validators.required),
       mobileNo:new FormControl(this.data.mobileNo, [Validators.required]), 
       year:new FormControl({value: this.data.year, disabled: true}, [Validators.required]), 
       month:new FormControl({value: this.data.month, disabled: true}, [Validators.required]),    
       password: new FormControl("", []),  
       passwordc: new FormControl("", []),  
  
  
    });
  </code></pre>
  
  <p>is there a way in angular for form control that i can verify both password and passwordc fields are equal. </p>