igorescobar / jQuery-Mask-Plugin

A jQuery Plugin to make masks on form fields and HTML elements.
http://igorescobar.github.io/jQuery-Mask-Plugin/
Other
4.77k stars 1.42k forks source link

Mask with phone number prefix #757

Open maximedotair opened 3 years ago

maximedotair commented 3 years ago

I want to use the mask

$('.input').mask('999 9999 9999');

but with prefix in option : if the user type "+44 999 9999 9999" the +44 is visible, if the user type "999 9999 9999" the +44 is not visible and both are acceptable.

Have you take a look into our docs?

https://igorescobar.github.io/jQuery-Mask-Plugin/

Make sure your read this before opening a new issue:

https://github.com/igorescobar/jQuery-Mask-Plugin#problems-or-questions

Device

[...]

Browser (and version)?

[...]

Functional jsfiddle exemplifying your problem:

You can use this one as exemple: http://jsfiddle.net/igorescobar/6pco4om7/

Describe de problem depth:

[...]

Is this plugin helping you out? Buy me a beer and cheers! :beer:

:bowtie: https://www.paypal.me/igorcescobar