I am trying to create a registration form which contains fields password and confirmPassword , i have used angular reactive forms and i have used validations of @rxweb package I have used cross field formGroup I have used compare validation from RxwebValidators
Here is my component.ts code :
export class RegisterComponent implements OnInit {
form: FormGroup;
password = new FormControl("", [RxwebValidators.required()]);
ConfirmPassword = new FormControl("", [RxwebValidators.compare({fieldName:'password '});
constructor(private fb: FormBuilder) {
}
ngOnInit() {
this.form = this.fb.group({
"password": this.password,
"ConfirmPassword ": this.ConfirmPassword
});
}
I'm not getting a solution how to move further upon this