title: Is it possible to have more than one custom validator on an Angular field?
body: <p>I tried this code:</p>
  
  <pre><code>   .directive('uniqueUsername', function (isUsernameAvailable) {
          return {
              restrict: 'A',
              require: 'ngModel',
              link: function (scope, element, attrs, ngModel) {
                  ngModel.$asyncValidators.uniqueName = isUsernameAvailable;
              }
          };
      })
      .directive("isMinSix", function () {
          return {
              restrict: "A",
              require: "ngModel",
              link: function (scope, element, attributes, ngModel) {
                  ngModel.$validators.isMinSix = function (modelValue) {
                      if (modelValue != null &amp;&amp; modelValue.length &lt; 6) {
                          return true;
                      } else {
                          return false;
                      }
                  }
              }
          }
      })
      .factory('isUsernameAvailable', function (appConstant, $q, $http) {
          return function (username) {
              var deferred = $q.defer();
              var url = appConstant.baseUrl + '/api/user/existsByName';
              $http({
                  url: url,
                  method: "PUT",
                  data: {
                      userName: username
                  }
              }).then(function () {
                      // Found the user, therefore not unique.
                      deferred.reject("User name is taken");
                  }, function () {
                      // User not found, therefore unique!
                      deferred.resolve();
                  });
              return deferred.promise;
          }
      })
  </code></pre>
  
  <p>My problem is that when I add these two directives to an input only and then put a debug point in the checks only one or the other will fire. I cannot get them both to work correctly at the same time:</p>
  
  <pre><code>                &lt;input class="inputField"
                         id="registerUserName"
                         name="registerUserName"
                         is-min-six
                         ng-model="aus.registerUserName"
                         ng-model-options="{ debounce: 3000 }"
                         ng-required="true"
                         placeholder="Username"
                         type="text"
                         unique-username
                         value="" /&gt;
  </code></pre>
  
  <p>Does anyone have any ideas what I may be doing wrong?</p>