Custom Validator on reactive form for password and confirm password matching getting undefined parameters into Angular 4
import {AbstractControl, FormBuilder, FormGroup, Validators} from set your password input into the group and no need to use “ngModel”. <div class=”form-group row” formGroupName=”passwords”> <div class=”form-group”> <label for=”password” class=”control-label”>Contraseña:</label> <input type=”password” class=”form-control” formControlName=”password” title=”Please enter your password”> <p class=”help-block” *ngIf=”signUpForm.get(‘password’).hasError(‘required’) && signUpForm.get(‘password’).touched”>Debe ingresar una contraseña</p> </div> <div class=”form-group”> <label for=”confirmedPassword” class=”control-label”>Confirmar Contraseña:</label> <input type=”password” class=”form-control” formControlName=”confirmedPassword” … Read more