I'm using regex for validating numbers in angularjs. But my code shows validation error when the number exceeds 9 digits.Could someone please help me to rectify my code such that any digits of number can be entered.
What I have tried is :
ng-pattern="/^\d{0,9}?$/"
Just remove the {0,9}? and use * instead like
/^\d*$/
{0,9} mean is any length between 0 and 9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With