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

Issue on form validate #138

@pcamarajr

Description

@pcamarajr

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;
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions