Format phone numbers for PhoneForm initial value#5628
Conversation
**Why**: - Because if the phone number is used in a PhoneInputComponent (in LG-5333, and after LG-5399), the intl-tel-input library could have trouble parsing the country of an arbitrary, user-entered number value, resulting in a scenario where the flag dropdown appears as an empty gray box. - Because presumably it is easier to read a nicely-formatted phone number than a string of 6-14 numbers.
|
LGTM! Do the parentheses and dashes automatically appear when the user types a numeric input? |
The changes here only affect the initial page load. After page load, it behaves the same as phone inputs behave everywhere else ("add phone", hybrid step), which doesn't auto-format the text in any way, except when switching from one country to another. Is that something we'd want? Might be worth a ticket to implement. |
OK great! I'm cool to leave the phone inputs alone for now except for this improvement on load, since IIRC it currently accepts a variety of user inputted formatting (dashes, no dashes, etc), which is good. Just wanted to check! |
Extracted from: #5619
Why:
Screenshots:
Screenshots taken with revisions in #5619 to use PhoneInputComponent on IAL2 address verification step.