automatically adding ng-minlength and ng-maxlength