RobinHerbots / Inputmask

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

Regex Latin Characters #859

Closed lvisb closed 2 years ago

lvisb commented 9 years ago

I'm trying to limit user to fill only letters and latin chars, but is not working.

Is my approach wrong or something to work on Regex? http://codepen.io/anon/pen/QwoKjN

Thanks

lvisb commented 9 years ago

Hm! Seems to be a bug with Mac. Windows 8 is fine.

Well, I'm changing my mind, I'll let the user fill in anything, I can't take the risk of not receiving some data.

Thanks.

RobinHerbots commented 9 years ago

what about just $(selector).inputmask("a", { repeat: "*", greedy: false});

lena773 commented 9 years ago

Hello,

I have a Problem. How can i delete a inputmask(). I mean, that i have ratio, in one choice must be the mask, in other no. So when i change the choice, mask stay on.

Thank you in advance

RobinHerbots commented 9 years ago

@lena773 ,

$(selector).inputmask('remove');

lena773 commented 9 years ago

thank you^^

lvisb commented 9 years ago

Robin, It works, I can fill áãà, but the idea was to use Regex to not let the user enter some type of character (like numbers, punctuation).

$("#test").inputmask('Regex', {regex:'[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿa-zA-Z ]+'});

http://codepen.io/anon/pen/QwoKjN