pattern to make an input text accept only numbers between 0-9.
this is my pattern:
$scope.onlyNumbers = /[\u0030-\u0039]+/g;
for some reason, chars like '-' will be accepted even though it is not in the range i have declared.
this is my input html:
<input style="width:40%;" type="text" name="phone" ng-minlength="10" ng-maxlength="15" ng-model="register.phone" placeholder='cell phone' ng-pattern="onlyNumbers" required title="please enter cell phone">
can someone help please?