RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.17k forks source link

multi emails #2538

Open oscaroxy opened 3 years ago

oscaroxy commented 3 years ago

Hi, is there a way to insert more than one email in inputmask email? thanks

oscaroxy commented 3 years ago

I should change the validator, but I don't know from how to how to change it.... thanks

RobinHerbots commented 3 years ago

Hi @oscaroxy, I didn't test it but by updating the mask.

Inputmask({
    alias: "email",
    mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}](, *{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]){*}",

This should allow test@test.com, test2@test.com, ....

RobinHerbots commented 3 years ago

2557, #2558

oscaroxy commented 3 years ago

unfortunately, don't work, I can write only:

pippo@pippo.it, pluto

I can't write other "@"

thanks

RobinHerbots commented 3 years ago

2559

oscaroxy commented 3 years ago

I didn't understand your reply, the issue #2559 bring here. the inputmask with your update

mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}](, *{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]){*}"

don't works, in fact if I try to insert more one email, the inputmask don't allow to insert more then one "@" simbol, so I can write at most "pippo@walt.it, pluto" without add again "@", like this "pippo@walt.it, pluto@walt.it"

thanks

oscaroxy commented 3 years ago

nothing?

oscaroxy commented 3 years ago

I tried other combination of mask, but I don't obtain that I want... the "@" doesn't appears. can you help me?

RobinHerbots commented 3 years ago

@oscaroxy ,

Yes I will/am working on extending the email mask to allow multiple entries.

oscaroxy commented 3 years ago

thanks, I'll wait your work, your library is the top for me.

RobinHerbots commented 2 years ago

There is some progress. Add the separator option to the email mask and enable entering 2 emails.

  Inputmask("email", {
            separator: ", "
        }).mask("test2");

todo:

oscaroxy commented 2 years ago

I tried but it doesn't work, it work like before, that is:

pippo@pluto.it, paperino

and I can't write the "@" thanks

RobinHerbots commented 2 years ago

Did you use the latest from the dist folder ?

oscaroxy commented 2 years ago

yes, with the last advice :

mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}](, *{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]){*}"

oscaroxy commented 2 years ago

I'm sorry, I didn't know of the new release 5.0.7-beta.32, I had .24, now I downloaded the new release and the inputText work fine for 2 email, but not for more email. How can I do for more email? thanks

RobinHerbots commented 2 years ago

@oscaroxy ,

Use the latest version 5.0.7-beta.34 ;-)

And have a try with

  Inputmask("email", {
            separator: ", "
            quantifier: 5
        }).mask("test2");

This will allow 6 e-mail adresses.

oscaroxy commented 2 years ago

I'm sorry for delay, I tried your update and it work, 6 email are enough for now :-D thanks a lot, your library is very very nice