How to allow on text input , numbers and one dot using Angular?
I have this on html :
<input type="text" ng-pattern="/^[0-9.]*$/" />
But I want to allow just one dot.
Any idea?
How to allow on text input , numbers and one dot using Angular?
I have this on html :
<input type="text" ng-pattern="/^[0-9.]*$/" />
But I want to allow just one dot.
Any idea?
Seems like you want to allow decimal or integer numbers.
^[0-9]+(?:\.[0-9]+)?$