I put a recaptcha in a signup form with angular2. I have a controller to match the recaptcha with a validator required.
this.captchaControl = fb.control(false, Validators.required);
this.userForm = fb.group({
...
captchaControl: this.captchaControl
});
And the value is correctly set to true when the user answer it.
checkReCaptcha(response){
console.log(this.userForm.valid);
this.captcha = response;
this.captchaControl.updateValue(true);
console.log(this.userForm.valid);
}
The first console log show false, the second print true.
In the submit button, I put the disable function:
<button type="submit" [disabled]="!userForm.valid" class="btn btn-d">Register</button>
But the button stay disable.
How can I trigger the button to check again the validity of userForm ?
