title: angularjs $setValidity from a directive not updating
body: <p>I am trying to build a custom directive (based on an example I saw) to ensure that the confirm password is correct.
  I am running into some trouble with the $setValidity tag, although all my console.log() execute and print out, it does not seem that the validity is being updated. Pass stays true even when I read in my console "set to false".
  I made sure the name and the ng-model are the same and I also tried using scope.$apply, but that would comeout with an error saying i was trying to apply when something else is being applied.</p>
  
  <p>Here is my code: 
  HTML</p>
  
  <pre><code>&lt;form ng-submit="signup()" name="profileForm"&gt;
  
  
              &lt;div class="form-group"&gt;
                &lt;label class="form-label" for="input-example-2"&gt;Password&lt;/label&gt;
                &lt;input class="form-input" ng-model="pnew" type="password" name="pnew" placeholder="Password" required&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                &lt;label class="form-label" for="input-example-2"&gt;Confirm Password&lt;/label&gt;
                &lt;input class="form-input" name="confirm" ng-model="confirm" type="password"  placeholder="Password" required pwcheck&gt;
              &lt;/div&gt;
              {{profileForm.confrim.$error.pass}}
              &lt;hr&gt;
              {{profileForm.confirm.$error}}
              &lt;hr&gt;
              {{profileForm.confirm.$valid}}
              &lt;span ng-show="profileForm.confirm.$error.pwCheck"&gt; the passwords dont match&lt;/span&gt;
              &lt;div class="form-group"&gt;
                &lt;button class="btn btn-primary"&gt;Sign up&lt;/button&gt;
              &lt;/div&gt;
            &lt;/form&gt;
  </code></pre>
  
  <p>JS code for the pwcheck directive</p>
  
  <pre><code>.directive('pwcheck', function() {   
    return {
      require: 'ngModel',
      link: function(scope, elm, attrs, ctrl) {
        function valid(value){
            scope.$watch("confirm", function(newval, oldval){
              console.log(value);
              console.log(scope.pnew);
                if(value==scope.pnew){
                  console.log("success!");
                  ctrl.$setValidity('pass', true);
                  return value;
                }
                else {
                  console.log("set to false");
                  ctrl.$setValidity('pass', false);
                  return undefined;
                }
  
            });
        }
        ctrl.$parsers.push(valid);
      }   } });
  </code></pre>