andr-04 / inputmask-multi Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://andr-04.github.com/inputmask-multi/
Home Page: http://andr-04.github.com/inputmask-multi/
closed
Hi,
I really love this bundle, however is it possible to also get the nice look after the number got masked.
So for example, when I type 79231234567 it finally looks as +7(923)123-45-67 and the output is 79231234567, how can I also get this nice look +7(923)123-45-67?
Thank you
How do you determine whether the full input has been given?
case "object":
if (("test" in opts.definitions[def].validator) && ("source" in opts.definitions[def].validator)) {
defs[def] = validator;
match.push(validator.source);
}
break;
this code doesn't work because opts is not defined only maskOpts available
Приветствую - ссылка на страницу с демо не работает
не затруднит обновить? Что бы потестить прежде чем тащить себе в проект
Добрый день! Не знала куда вам можно было написать, чтобы задать вопрос. Если я правильно поняла из readme, то опциональный аргумент mode можно заюзать, чтобы отследить полностью заполнено поле ввода телефона или нет. Можете привести пример использования этого параметра для проверки заполненности поля? А то не очень поняла, как это использовать.
Заранее спасибо!
Hello,
I have issue with this on android devices (only when using android keyboard). When typing on android keyboard (e.g. 38160) it should recognize Serbian number and mask should be adapted for Serbian region. But it doesn't. It look like this:
and if i delete last number using backspace it turns out to be right:
I am using Samsung Galaxy S9, but problem is present on other android devices I tried too.
Also, When I connect android device to my mac book with USB, and debug android chrome remotely, problem occurs only when using android keyboard, when typing on mac book, everything works fine.
Can you advice how to fix this?
I'm trying to make inputmask for all phone inputs. Their ids are same but it didn't work so far.
Здравствуйте!
Подскажите, а можно как то сделать что бы код страны нельзя было стереть?
Я маску страны ставлю при выборе пользователем страны. После того как пользователь переходит к полю заполнения телефона не очень хочу что бы он мог править код страны.
Спасибо.
Basically, inputmask data for Nepalese numbers is incorrect.
They are in reality written as +977-985-106-8231
However, plugin processes it as +977-98-510-682, and in my case cuts 31 off.
It would be good if that was fixed.
I love the plugin, it works well for me in fields in a form as I input input phone number entries. Is there are way to either store the mask formatted input to a database field or to format when stored input is recalled from a stored database field?
The phone masking is working fine in all scenarios except for one. In Firefox, on selection of the text , the masking getting disturbed. I observed the same in your demo application [http://andr-04.github.io/inputmask-multi/en.html] as well It is getting shifted to right hand side. I tried using the new "jquery.inputmask.js [2.x]" from Robert Git repository , but it was breaking the original masking as well. My current version is "1.3.22". You help will be much appreciated.
Mask does not work.
https://andr-04.github.io/inputmask-multi/ru.html
hi, I'm trying to export word file with formatted inputs but it doesn't work in office. I need to do the masking in server side in visual studio. Do you have any library that I can use ?
Андрей, добрый день! Я нашел Вашу разработку по ссылке inputmask RobinHerborts. Очень понравилась реализация,- легкая и эффективная. Но есть вопрос и проблема.
Вопрос. Я так понимаю, что событие onchange нужно вызывать в параметре onMaskChange, иначе после заполения поля, само по себе событие onchange не вызывается, а следовательно невозможно получить значение val() в других местах кода.
Проблема. Вставив строку в onMaskChange $(this).change(); я понял, что есть проблема, которая заключается в том, что даже при незаконченном заполении кода происходит выход(может потеря фокуса) из поля. А при применении alert вообще возникает циклическая обработка.
Посмотрите пож. https://jsfiddle.net/6u3xbnk8/57/
Это копия Ваших примеров, я добавил в onMaskChange только alert("It's a circular event!"); на котором происходит цикличность обработки.
Можно ли это исправить или обойти? Спасибо.
P.S. Я не специалист по jQuery, поэтому прошу прощения, если неточно или некорректно описываю ситуацию.
Привет!
Возможно ли использовать вашу библиотеку с International Telephone Input ?
Hello!
I have a bug om android/chrome.
When input code like 380, or 44 I get no code of country.
In video you can see this problem.
FILE 2020-08-06 14_34_13.mp4.zip
Hello!
If I use the "clearIncomplete: true" parameter, the plugin does not work well!
How can I fix the error?
Try with +44-44-4444-4444 phone number!
https://jsfiddle.net/mxo36qge/
How do I resolve the "clearIncomplete: true" function?
THX!
Добрый, ковыряю, и не могу найти, каким образом можно забрать из определённого jQuery объекта val() с маской, что бы давалось не цифры, а так же скобки и прочее.
С условием если указано - autoUnmask: true
Спасибо
Hello,
I'm using your plugin with inputmask 3.0.55 on a form that allows grade entry for tests in a class. I have fields that must allow either a timed score (such as MM:SS format) or an "X" to indicate that a particular student did not complete the test. I am replacing long-standing code that did not work with IE 11 or Chrome, so there is a lot of data in the wild and many existing users who are familiar with this functionality and so I can't change it; I must allow a time (in a variety of user-selected formats) or an upper- or lowercase X.
This all works fine, and having multiple masks is very cool (thanks!), except that a couple of lines of event handling code in inputmask-multi are preventing me from entering uppercase letters.
In the mask function, lines 195 and 198 cause a "return true" if e.shiftKey is true... but that will be true even if the shift key is being held down in order to uppercase a letter. I changed that section of code to the following:
if (e.ctrlKey || k == opts.keyCode.SHIFT || e.altKey) {
return true;
}
} else if (e.type == "keypress" && (e.ctrlKey || k == opts.keyCode.SHIFT || e.altKey)) {
return true;
}
and it all works great. Without that change, the code exited before ever calling the keypressEvent function in inputmask, so my letter mask (with /[xX]/ validator) always failed for uppercase X (but worked fine for lowercase x).
Is this a reasonable change to make? Should the other key references here also use the opts.keyCode values or are they best left as they are?
Thanks,
Ann
Приветствую.
Опишу проблему
Открываю пример в Chrome на мобильном, пытаюсь ввести номер.
Допустим маска +7()--
ввожу +7(111)2 и тут курсор перескакивает и встаёт перед двойкой, а не за ней. То же самое, когда дохожу до +7(111)222-3 курсор встаёт перед тройкой.
То есть, когда вводимый символ становится следующим за ")" или "-", то курсор встаёт перед ним.
Не знаю, понятно ли объяснил, но в любом случае, проще открыть пример на телефоне и попытаться осуществить ввод.
Сможете ли исправить эту ошибку?
P.S.: во встроенном в Android браузере такой проблемы нет.
Здравствуйте.
Очень давно использую вашу библиотеку. Спасибо.
И пока работали с рос. номерами всё было ок.
Но вот обнаружил, что при копи-пасте некоторых зарубежных номеров обрезается последняя цифра.
Скрин:
Причем, если этот номер ввести вручную, то он введется корректно. А при вставке одну цифру обрежет.
Как это малой кровью победить?
Plugin isn't correct work with inputmask version 2.
(294) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, …]
inputmask.js:30 Uncaught TypeError: Cannot read property 'length' of undefined
at generateMask (inputmask.js:30)
at generateMaskSet (inputmask.js:67)
at HTMLInputElement. (inputmask.js:1331)
at Function.each (jquery.min.js:2)
at Inputmask.mask (inputmask.js:1303)
at HTMLInputElement. (jquery.inputmask.js:48)
at Function.each (jquery.min.js:2)
at e.fn.init.each (jquery.min.js:2)
at e.fn.init.$.fn.inputmask.$.fn.inputmask (jquery.inputmask.js:47)
at HTMLInputElement.maskApply (jquery.inputmask-multi.js:241)
The first log belongs to json. When I execute it, this error shows up. Can you tell which js files should be used and which order ??
{ "mask": "+43(677)###-#####", "cc": "AT" },
{ "mask": "+43(681)###-#####", "cc": "AT" },
{ "mask": "+43(688)###-#####", "cc": "AT" },
{ "mask": "+43(699)###-#####", "cc": "AT" },
Здравствуйте,
Масштабирую свой проект на все города России (и СНГ страны).
В связи с тем, что в случае несоответствия кода города одному из предложенных шаблонов, ввод не подходящей цифры отменяется, у меня возник вопрос об актуальности базы городов. Не получится так, что городу добавится новый номер, к моим клиентам будут приходить люди с подобными номерами, а клиенты просто не смогут их номер записать?
Хотелось бы знать, на основании каких данных и как часто обновляется список?
Или как еще можно решить мой вопрос?
Может, есть возможность включить что-то вроде "маски по умолчанию", вроде unknown?
Заранее спасибо за ответ и за отличную разработку! Очень удобная маска, особенно, автоопределение города.
We at VersionEye are working hard to keep up the quality of the bower's registry.
We just finished our initial analysis of the quality of the Bower.io registry:
7530 - registered packages, 224 of them doesnt exists anymore;
We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).
Sadly, your library andr-04/inputmask-multi
is one of them.
Can you spare 15 minutes to help us to make Bower better?
Just add a new file bower.json
and change attributes.
{
"name": "andr-04/inputmask-multi",
"version": "1.0.0",
"main": "path/to/main.css",
"description": "please add it",
"license": "Eclipse",
"ignore": [
".jshintrc",
"**/*.txt"
],
"dependencies": {
"<dependency_name>": "<semantic_version>",
"<dependency_name>": "<Local_folder>",
"<dependency_name>": "<package>"
},
"devDependencies": {
"<test-framework-name>": "<version>"
}
}
Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.
NB! Please validate your bower.json with jsonlint before commiting your updates.
Thank you!
Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!
Demo page don't load phone-codes.json and work like simple input.
Wrong package name for Bower.
bower install jquery.bind-first#v0.1.0
work well
bower install bind-first#v0.1.0
ENOTFOUND Package bind-first not found
Recently (on the past years) some of the cellphone numbers changed, adding a 9 before the number:
+55 (11) 1234-5678 => +55 (11) 91234-5678
This is only valid for cellphone numbers from some states, not for the entire country, but one of the most, if not the most, influent state here, São Paulo (area code 11), adopted this format and your mask for Brazilian numbers does not account for this change.
One possible solution would be to always expect the number to have nine digits when is starts with the number 9, but reformat the mask to 8 digits if it's filled with 8 digits on blur.
I have met an issue with validation phone field that could be different length. Being not very experienced with validations i have found may be not best solution but for my situation it worked you.
May be it will help you.
So problem is that for one country mask length - 10, for another 12, for another 13 and we need to warn user to fill phone field completly.
I used this algorithm:
if (/_/.test(phoneInput.val())) {
alert('phone empy, pls enter phone');
//do any stuff u want here - shows divs erros etc
}
Little advantage over //clearIncomplete: true, is that it leaves user input to complete later
Would be glad to know correct/other ways to validate different length
Hi , I am using input mask-multi-master plugin it works file on PC and iphone . It have issue at android devices As we type, the cursor changes alone position and bug the mask.for example if we type 9718 it type 9781. Please give me any solution only issue on android
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.