The mask format is very confusing / not intuitive from examples #174
Unanswered
matthew-dean
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Maybe none of the use cases I'm trying to do are supported? I can't understand why they wouldn't be, though, for a masked input. 🤔 |
Beta Was this translation helpful? Give feedback.
1 reply
-
It worked to me: <input
v-maska
data-maska="A"
data-maska-tokens="A:[-_ A-Za-z0-9]:multiple"
> |
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
-
I've been a web dev for over 20 years, and worked with Regex for a good portion of that, and for the last hour, I haven't been able to make heads or tails of how masking characters and patterns are supposed to work.
For example, say I want something that's a very simple regex. That is:
In other words, it's a regex like:
/^[A-Za-z0-9]+(\s[A-Za-z0-9]+)*$/
However, I can't figure out from the examples and lots of trial and error how to express this in the Maska format or using Maska options. It seems to match one token at a time, and that token is not preserved, meaning there's no logic about what comes after, say, a single space.
Similarly, I can't figure out how to match something like dash-case, where you can have only single dash separators, and no trailing or preceding dashes.
Can anyone help?
Beta Was this translation helpful? Give feedback.
All reactions