I have a text input field where I need to limit the value between 1 and 20. Here is the HTML code snippet:
<input
type="number"
class="form-control input-rounded"
ng-model="Ctrl.new.runner"
ng-change="Ctrl.newChangeAction(Ctrl.new)"
min={{minRunnerValue}}
max={{maxRunnerValue}}
ng-model-options="{debounce:500}" >
<span ng-show="Ctrl.newObject.runnerWarning">
<i>{{Ctrl.Object.runnersWarning}}</i>
</span>
MY CTRL:
$scope.runnerWarning = "";
ctrl.minRunnerValue = 1;
ctrl.maxRunnerValue = 20;
I want to validate both user input and arrow key input (Up and Down). While arrow keys work fine, user input validation seems to be not functioning correctly. Additionally, the warning message is not displaying.
Thank you for your assistance.