title: Custom validation not triggered when setting model value programmatically
body: <p>Created a custom validation directive that invalidates an input when anything else than a number or space is input. When I change the value programmatically to something that should pass validation, the validation state is not changed. </p>
  
  <p>Check this <a href="http://jsfiddle.net/zorro/m2Yq4/" rel="nofollow">JSFIDDLE</a> and see for yourself. Any ideas?</p>
  
  <pre><code>&lt;div ng-app="test" ng-controller="Ctrl"&gt;
  &lt;form name="form"&gt;
      &lt;input custom-validation type="text" ng-model="box.text" name="text" /&gt;
  &lt;/form&gt;
  &lt;button ng-click="change()"&gt;Change to numbers only&lt;/button&gt; 
  Why doesn't changing to numbers only pass the validation?
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>angular.module('test', []);
  angular.module('test').directive('customValidation', function () {
      'use strict';
      return {
          require: '?ngModel',
          link: function (scope, element, attrs, ngModelCtrl) {
  
              ngModelCtrl.$parsers.push(function removeIllegalCharacters(viewValue) {
  
                  if(viewValue === undefined){
                      ngModelCtrl.$setValidity('numbersAndSpacesOnly', true); //empty value is always valid
                  } else {
                      var clean = viewValue.replace(/[^0-9 ]+/g, '');
                      if (viewValue === clean) {
                          ngModelCtrl.$setValidity('numbersAndSpacesOnly', true);
                      } else {
                          ngModelCtrl.$setValidity('numbersAndSpacesOnly', false);
                      }
                  }
  
                  return viewValue;
              });
  
          }
      };
  });
  
  angular.module('test').controller('Ctrl', function ($scope, $timeout) {
      $scope.change = function () {
          $scope.box.text = '12345';
      }
  });
  </code></pre>