<input class="span10" type="number" max="99999" ng-maxLength="5" placeholder="Enter Points" ng-change="myFunc($index)" ng-model="myVar">
This will only change the value of form.input.$valid
to false
if value is larger than 99999 or 5 digits. otherwise its true
. However , the user is still able to enter any length number. I just want to limit the digits he is entering just like maxlength of html.