Ng-pattern on actual device

I’m trying to implement a simple numbers validation. The field will only accept whole positive numbers. Not even a (dot) is allowed. I’m using this regex (^(0|[1-9][0-9]*)$/) and it works fine on browser and other online regex tester but when running it on ionic serve and on an android device it doesn’t behave as expected.

edit: not sure if this is the correct category, please inform me if not and will immediately change it. ty

quite vague, please better describe your problem.

Sorry for that.

Expected behavior is that it only allows whole numbers. When I start typing (dot) like ‘45.’ the validation triggers and ng-message for pattern is shown.

When I try this on browser via ‘ionic serve’ and on actual device via ‘ionic run’, the validation is not triggered and the message for invalid pattern does not appear