Skip to content

[doubt] Why do we need to set the default_country_code to use the format? #93

@AllanKlaus

Description

@AllanKlaus

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions