-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IP address #127
Comments
don't |
or maybe you could register another translatrion option, like not that I ever used this lib, just tring to help :D EDIT: We could raise an issue to support patterns that match with more than one character :D |
@vhoyer |
Yeah, sorry, afterwards I went to try it out and figured it doesn't work. I took a look at the code and it would be a pain to implement this :D. I think it is possible, but it would require a lot of work. That said, my other suggestions (of doing Is that a super problem? |
Unfortunately, it is problematic. I have several extreme cases:
|
You're also not taking into consideration the fact that "999.999.999.999" would pass the mask validation, but would be an invalid IP address. You would need a custom token to ensure that you allow 4 groupings of numbers 0-255. This is untested, but something like this could work:
|
In fact, I tested this, I mentioned about it on this other comment. Unfortunatly, the custom tokens implementation for a single token match with more than one character does not exist. :/ If you see this while loop closely: https://github.com/vuejs-tips/vue-the-mask/blob/master/src/maskit.js#L7-L26 you will notice that this checks in a per character basis, meaning the custom pattern we made just go through as unmatched :( Although I think even if we were to open a PR for this feature, no mantainer would bother, as this repo has been staled for like, two and a half years. |
Any alternative repo? |
@vhoyer Ah, you're right. I completely missed your comment, sorry about that. And you're 100% right, this library falls short in that it's on a per-character basis. It doesn't look like it was built for this level of pattern-matching. I've already put in an issue asking for the maintainers to mark this project as abandoned. We'll see if they even bother to respond. |
There is this guy that posted an issue here about forking this project: #112. This is the fork: https://github.com/RonaldJerez/vue-the-mask later on, apparently he decided to create a new package: https://github.com/RonaldJerez/vue-input-facade Although I haven't tested any of that, the last commit is from January 3rd, so it looks promising |
How is possible to mask an IP address?
This works only if you got full IP, but very common is get ###.###.#.##
The text was updated successfully, but these errors were encountered: