I have angular2 form as:
this.registerForm = formBuilder.group({
'name': ['', Validators.required],
'email': ['', Validators.compose([Validators.pattern("[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"), Validators.required])],
'password': ['', Validators.compose([Validators.minLength(6), Validators.required])],
'repassword': ['', Validators.compose([Validators.minLength(6), Validators.required])]
});
But I am unable to figure out how to check repassword with password and throw error msg.
** I followed answer of Angular 2 form validating for repeat password but unable to include ControlGroup.
Please help