Code Monkey home page Code Monkey logo

inputmask-multi's People

Contributors

alexzaytsav avatar andr-04 avatar klimov-paul avatar noff avatar orloffv avatar robinherbots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inputmask-multi's Issues

Nice look to be saved

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

Validation

How do you determine whether the full input has been given?

invalid opts in create function

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

не работает страничка проекта

Приветствую - ссылка на страницу с демо не работает
не затруднит обновить? Что бы потестить прежде чем тащить себе в проект

isCompleted

Добрый день! Не знала куда вам можно было написать, чтобы задать вопрос. Если я правильно поняла из readme, то опциональный аргумент mode можно заюзать, чтобы отследить полностью заполнено поле ввода телефона или нет. Можете привести пример использования этого параметра для проверки заполненности поля? А то не очень поняла, как это использовать.
Заранее спасибо!

Doesn't Work with Jquery.Inputmask v3.1.33

when i update the jquery.inputmask to v3.1.33 the pluging stop working correctly.
here is how it looks before entering data
1

and here is how it looks after entering some data
2

P.S.: it doesn't work with any version above 2.0 of input mask

problem with android (Including demo) - recognize country after backspace

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:
screen shot 2019-01-14 at 10 32 32 am
and if i delete last number using backspace it turns out to be right:
screen shot 2019-01-14 at 10 35 28 am

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?

Запрет на удаление кода страны

Здравствуйте!
Подскажите, а можно как то сделать что бы код страны нельзя было стереть?
Я маску страны ставлю при выборе пользователем страны. После того как пользователь переходит к полю заполнения телефона не очень хочу что бы он мог править код страны.

Спасибо.

Nepal numbers problem

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.

Issue with FF

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.

server side library

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 ?

Циклическая обработка события onMaskChange

Андрей, добрый день! Я нашел Вашу разработку по ссылке 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, поэтому прошу прощения, если неточно или некорректно описываю ситуацию.

clearIncomplete problem

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
Спасибо

Can't enter uppercase letters

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 браузере такой проблемы нет.

Copy & Paste

Здравствуйте.
Очень давно использую вашу библиотеку. Спасибо.
И пока работали с рос. номерами всё было ок.
Но вот обнаружил, что при копи-пасте некоторых зарубежных номеров обрезается последняя цифра.

Скрин:

phones

Причем, если этот номер ввести вручную, то он введется корректно. А при вставке одну цифру обрежет.
Как это малой кровью победить?

Uncaught TypeError: Cannot read property 'length' of undefined

(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 ??

Add austria phone numbers mask

{ "mask": "+43(677)###-#####", "cc": "AT" },
{ "mask": "+43(681)###-#####", "cc": "AT" },
{ "mask": "+43(688)###-#####", "cc": "AT" },
{ "mask": "+43(699)###-#####", "cc": "AT" },

Актуальность базы

Здравствуйте,

Масштабирую свой проект на все города России (и СНГ страны).
В связи с тем, что в случае несоответствия кода города одному из предложенных шаблонов, ввод не подходящей цифры отменяется, у меня возник вопрос об актуальности базы городов. Не получится так, что городу добавится новый номер, к моим клиентам будут приходить люди с подобными номерами, а клиенты просто не смогут их номер записать?
Хотелось бы знать, на основании каких данных и как часто обновляется список?
Или как еще можно решить мой вопрос?
Может, есть возможность включить что-то вроде "маски по умолчанию", вроде unknown?

Заранее спасибо за ответ и за отличную разработку! Очень удобная маска, особенно, автоопределение города.

[enhancement] Add missing bower.json.

Hey, maintainer(s) of andr-04/inputmask-multi!

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!

Brazilian cellphone numbers changed

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.

How to validate field with various mask length ?

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:

  1. Change inputmask initialization setting 'autoUnmask': false, so when getting input value - you get it with _ symbol
  2. Use this simpliest regexp to find if there any '_' left in input field , if so - field not completed

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

phone mask cursor issue on chrome on some androids

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.