title: How can I force an angular validation directive to run?
body: <p>I've created a validation directive for my form.
  It basically validates a fields value based on data from another field.</p>
  
  <p>It works perfect :-)</p>
  
  <p>My problem is that if the other field changes after the validation was executed, the validation will not run again.</p>
  
  <pre><code>var myApp = angular.module('myApp', [])
  
  .directive('validateInteger', function() {
    return {
      require: 'ngModel',
      link: function(scope, elm, attrs, ctrl) {
        ctrl.$parsers.unshift(function(viewValue) {
            var int1val = scope.int1;
            scope.int2valid = (viewValue &gt; int1val) ? "valid" : undefined;
            if (scope.int2valid == "valid") {
                ctrl.$setValidity('higher', true);
                return viewValue;
            } else {
                ctrl.$setValidity('higher', false);
                return undefined;
          }
        });
      }
    };
  });
  </code></pre>
  
  <p>jsfiddle: <a href="http://jsfiddle.net/hanspc/vCFFQ/">http://jsfiddle.net/hanspc/vCFFQ/</a></p>