marmelroy / PhoneNumberKit

A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
MIT License
5.14k stars 818 forks source link

Formatting phone number without dash ("-") #715

Closed kienwei518 closed 10 months ago

kienwei518 commented 1 year ago

New Issue Checklist

Steps to reproduce

Pass a phone number to textField.text or type any phone number. The number come out with a dash e.g. +60 012-3456789

Expected result

An option to apply phone number format by modifying the MetadataPhoneNumberFormat's format value

Actual result

All number is come with "-"

Environment

I able to modify the replaceStringByRegex method by replacing "-" with empty string. However, this code will gone every time I pod install/update. Is there any better solution ?

Screenshot 2023-10-19 at 4 18 49 PM
bguidolim commented 1 year ago

It comes from the metadata, as you can check by yourself on JavaScript version. You might need to change it in a higher level.

kienwei518 commented 1 year ago

It comes from the metadata, as you can check by yourself on JavaScript version. You might need to change it in a higher level.

By modifying in JavaScript version, it still will gone when I pod install/update right ?

github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.