x-mask dropping digits when applying autocomplete #4252
Unanswered
robertmarney
asked this question in
5. Bugs
Replies: 1 comment
-
I would expect the first. Since that is 10 numbers, not 11. So the first 1 is consumed in the mask itself. Luckily, there are no valid area codes that begin with 1, so this isn't a real issue of concern.
it is. so the mask strips itself out, which gives you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
'x-mask' => '+1 (999) 999-9999'
User provided input of 1234567890 is being applied as +1 (234) 567-890, where we would expect +1 (123) 456-7890
This is replicated here without any external dependencies / wrappers.
https://codepen.io/Robert-Marney/pen/RwmVqWE
You can see that if the mask does not start with a number it works fine (e.g. +z (999) 999-9999)
For clarity any element of the mask that is not
9
a
or*
should be treated as the mask.Beta Was this translation helpful? Give feedback.
All reactions