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