title: angular how to disable validation on condition ng-required
body: <p>I have a variable on the scope which I use to check for condition</p>
  
  <pre><code>$scope.data = $resource().query(); //returns array always
  </code></pre>
  
  <p>So i have a regular validation with a ng-required directive</p>
  
  <pre><code>&lt;input ng-required="{{data.length}}"/&gt;
  </code></pre>
  
  <p>now when the data is initially loaded into a 2 length array the ng-required validates the field and everything works, 
  but if I were to set ng-required to [], ng-required will still validate as a regular required, </p>
  
  <pre><code>$scope.$apply(function(){
      $scope.data = []
  });
  </code></pre>
  
  <p>how do I disable validation on ng-validation = "false" again.</p>