Edit in plunkr
Steps involved
- Specify input type
- Specify the angular pattern in regular expression
<input type="number" name="price_field1" ng-model="price1" ng-pattern="/^(0|[1-9][0-9]*)$/" /> <span ng-show="frm1.price_field1.$error.pattern"> Not a valid number ! </span>
Output
No comments:
Post a Comment