This repository was archived by the owner on Aug 17, 2021. It is now read-only.

Description
I've added the angular recaptcha directive inside my form, and I use the property myForm.$valid
to enable my submit button.
I inform the required fields and validate the captcha and my button got enabled, was expected, but, if I wait for the expiration of the captcha, my button wasn't getting disabled again. Hope that you can understand my bad english.
I fixed this in my project by adding a scope.$apply
inside the validate()
function, and now all works fine. My question, is it a possible bug or not?
function validate(){
if(ctrl){
ctrl.$setValidity('recaptcha', scope.required === false ? null : Boolean(scope.response));
}
scope.$apply;
}