Can't understand how to add ng-pattern that will mark field as invalid for all not valid entries.
I have tried to use this one "/^(0|\-?[1-9][0-9]*)$/
It works quite well with filtering numbers like 0.1 or even 0123 which are not valid (and not filtered out by /^-?[0-9][^\.]*$/
which was considered as right answer in some similar questions).
But actually it doesn't filter out numbers like "+3" and "1." (regex seems to be right and doesn't allow these values, i have tried to check it on regex101.com) If you use one of ng-patterns i listed here, try to enter +N into your input field. You will notice that it's valid. (might be that model will contain 3 & 1 instead of +3 & 1. but i would mark input as invalid anyway until user enters real integer number)
Hope anyone had the same problem.
By the way, one of possible solutions is to create directive that prevent ability to enter "." and "+" but i wonder whether it's possible to solve this problem with ng-pattern.