candreoliveira / ngMask

Best Angular mask alternative! No jQuery, pure JS. About ~6kb!
http://candreoliveira.github.io/#/ngMask
ISC License
419 stars 171 forks source link

ngMask enters non-existing characters. #155

Open PurpleRa1n opened 6 years ago

PurpleRa1n commented 6 years ago

Mask: mask="+(999) 9?9?9?9? 999-9999" Actual behavior on input: "+(999) 9999-999-999" Please pay attention on 12th character "-", which is not in the mask. This symbol substitutes for some reason the mask itself and as a fact, the input does not pass its own validation. Expected result: "+(999) 9999 999-9999".

Maybe it's a little bit strange result but what i actually want is to separate country code (first 3 numbers) and last 7 characters, with additionally optional 4 characters.