I'm trying to use imask.js for phone validating on subscribe form.
I currently have this simple code :
var phoneMask = IMask(
document.getElementById('number_phone'), {
mask: '+{33}000000000'
});
I want to disable the capacity of put a 0 just after the {33} to have this kind of number at the end of the subscription : +33666666666. But allow to put a 0 after the first number.
I've try some Regex but still not working :(
Instead of using a single mask for the whole phone number, we break it into three parts:
What the masks does:
+33is always present.0. We use a custom definition to only allow digits from1to9.0).The mask will prevent the user from entering a
0immediately after the+33country code but will allow entering a0after the first digit.