Angular JS - How do you validate the number of digits in a number input

后端 未结 4 1644
执笔经年
执笔经年 2021-01-28 17:08

What we are looking to do is, have an input that only accepts 0 - 24 (for a time entry application).

These are the values the user should be able to enter into the inpu

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-28 17:34

    Maybe you could use the [ng-maxlength="number"] directive. Set it to 2 like this:

        

提交回复
热议问题