title: Cross field validation - Angular2 RC6
body: <p>I don't succeed in creating a basic Cross field validation for my form with <strong>Angular 2 rc.6</strong>.</p>
  
  <pre><code>constructor(private fb: FormBuilder) {
      this.signUpForm = fb.group({
          "firstName": ["", Validators.required],
          "lastName": ["", Validators.required],
          "email": ["", [Validators.required, ValidationService.emailValidator]],
          "password": ["", [Validators.required, ValidationService.passwordValidator]],
          "passwordConfirm": ["", [Validators.required]]
      }, {validator: this.matchingPasswords('password', 'confirmPassword')});
  
      this.firstName = this.signUpForm.controls["firstName"];
      this.lastName = this.signUpForm.controls["lastName"];
      this.email = this.signUpForm.controls["email"];
      this.password = this.signUpForm.controls["password"];
      this.passwordConfirm = this.signUpForm.controls["passwordConfirm"];
  }
  
   matchingPasswords(passwordKey: string, confirmPasswordKey: string) {
      return (group: ControlGroup): {[key: string]: any} =&gt; {
          let password = group.controls[passwordKey];
          let confirmPassword = group.controls[confirmPasswordKey];
  
          if (password.value !== confirmPassword.value) {
              return {
                  mismatchedPasswords: true
              };
          }
      }
  }
  </code></pre>
  
  <p>I have seen the post <a href="https://stackoverflow.com/questions/35413693/cross-field-validation-in-angular2">Cross field validation in Angular2</a> but the point is that I am using Angular 2 rc.6.</p>
  
  <p>With Angular 2 rc.6, <strong>ControlGroup</strong> is no more available from <strong>@angular/common</strong> and is not part of the updated <strong>@angular/forms</strong> where I get the <code>FormBuilder, Validators, AbstractControl, FormGroup</code>.</p>
  
  <p>It results that my method <code>matchingPasswords</code> is not working anymore and I cannot check that the two passwords match.</p>
  
  <p>Do you guys know what should I use instead of <strong>ControlGroup</strong> ?</p>