andr-04 / inputmask-multi

http://andr-04.github.com/inputmask-multi/
253 stars 106 forks source link

Brazilian cellphone numbers changed #15

Closed rcdmk closed 8 years ago

rcdmk commented 9 years ago

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.

andr-04 commented 8 years ago

Fixed. Thanks!

rcdmk commented 8 years ago

Great! Thank you!