I am using an angular app, with an html5 number type input. I am trying to restrict the input to only accepts positive integers and not decimal, floating point numbers.
I tried using some patterns and step=1 min, max values but does not seem to work.
Please suggest.
EDIT:
This is how my form looks like. Sorry for the confusion if I may have cause.
<div class="row bottom-spaced-small">
<div class="col-md-3">
Number*
</div>
<div class="col-md-9">
<input name="txtNumber" ng-disabled="somevalue" min="1" step="1" type="number" ng-required="true" ng-maxlength="50" ng-model="someNumber" class="form-control color-black" />
</div>
<div class="row" style="padding-left: 30px" ng-if="someForm.$submitted && !someForm.txtNumber.$valid">
<span style="color: red">Number is mandatory and must be a non 0 positive number.</span>
</div>
</div>