Closed nathan-fiscaletti closed 6 months ago
This isn't currently supported, but if you want to put together a PR we'd probably accept it. Would need a port of: https://github.com/google/libphonenumber/blob/master/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java
I've created the initial port of the AsYouTypeFormatter, however, it's not functional in its current state. Would love someone else to take a look if they have the time.
https://github.com/nathan-fiscaletti/phonenumbers/blob/master/asyoutypeformatter.go
Managed to work through the errors, just need to figure out why none of the test cases succeed :(
Is there a way to format a number that is not complete?
For example, the following COMPLETE number works fine
However, if I instead pass a PARTIAL number, it loses all formatting.
I would like it if that would spit out:
Since I want to use this for as the user types their phone number in, displaying it in a proper format.
Is this doable with this library?