IP mask doesn't work correctly
darkons opened this issue · comments
David SP commented
Describe the bug
When using the example IP mask, is not working on loaded and pasted values.
Steps to reproduce
Apply the example IP mask to your input and load/paste an IP like 140.55.150.80
<TextInput
v-model="public_ip"
v-maska
data-maska="100.100.100.100"
data-maska-tokens="1:[0-2]|0:[0-9]:optional"
type="text"
/>
Reproduction link
Alexander Shabunevich commented
Not a bug, more like format question.
With given mask and tokens you should use zero-leading IP address, like 140.055.150.080
And if you want to use address like 140.55.150.80
then set tokens as 1:[0-9]|0:[0-9]:optional
David SP commented
Fixed!
Thank you so much and apologies for treating this as an issue. I'm a bit of a novice with masks logic.