title: password and confirm password field validation angular2 reactive forms
body: <p>I need to check whether password and confirm password fields have same value using reactive form angular2. I did see a lot of answers on the same here,<a href="https://stackoverflow.com/questions/35474991/angular-2-form-validating-for-repeat-password">Angular 2 form validating for repeat password</a> ,<a href="https://stackoverflow.com/questions/33768655/comparing-fields-in-validator-with-angular2">Comparing fields in validator with angular2</a>, but none seemed to work for me.Can someone please help."this" is undefined in my validate function :( .
  Sharing my code,</p>
  
  <pre><code>this.addEditUserForm = this.builder.group({
              firstName: ['', Validators.required],
              lastName: ['', Validators.required],
              title: ['', Validators.required],
              email: ['', Validators.required],
              password: ['', Validators.required],
              confirmPass: ['', [Validators.required, this.validatePasswordConfirmation]]
          });
  validatePasswordConfirmation(group: FormGroup): any{
          let valid = true;
          // if (this.addEditUserForm.controls.password != this.addEditUserForm.controls.confirmPass) {
          //     valid = false;
          //     this.addEditUserForm.controls.confirmPass.setErrors({validatePasswordConfirmation: true});
          // }
          return valid;
      }
  </code></pre>