title: how to do conditional maxlength in angularjs
body: <p>does anyone know how to do conditional maxlength in angularjs, I have found conditional required but not maxlength etc....</p>
  
  <p>for example if maxlength given ...it should validate but if maxlength is 0 or false, it should not....</p>
  
  <pre><code>$scope.validation = {a: {required:true,minlength:5, maxlength:10}, 
                       b: {required:false,minlength:0, maxlength:false}}
  </code></pre>
  
  <p>Html gets created using ng-repeat loop....n now problem is maxlength gets fired everytime...whereas i have disabled it for second input field</p>
  
  <pre><code>&lt;input type="text" name="myName" ng-model="name" ng-minlength='validation.a.minlength' ng-maxlength="validation.a.maxlength" ng-required='validation.a.required'  /&gt;
  
  
  &lt;input type="text" name="myName1" ng-model="name1" ng-minlength='validation.b.minlength' ng-maxlength="validation.b.maxlength" ng-required='validation.b.required' /&gt;
  </code></pre>