I'm using Phoner::Phone.parse(phone_number).format(:us). I didn't set the default_country_code so I got the error Phoner::CountryCodeError (Must enter country code or set default country code).
I already saw on method parse we have a Country.load but why do I need to set the contry code if I only want to format the phone number? There is a reason for it?
I'm using
Phoner::Phone.parse(phone_number).format(:us). I didn't set thedefault_country_codeso I got the errorPhoner::CountryCodeError (Must enter country code or set default country code).I already saw on method
parsewe have aCountry.loadbut why do I need to set the contry code if I only want to format the phone number? There is a reason for it?