Skip to content

Invalid UK Phone number formats according to Alternate validation library / Ofcom #3135

@luke-hill

Description

@luke-hill

Describe the bug

Faker::PhoneNumber.phone_number_with_country_code produces invalid phone numbers for the UK

To Reproduce

Produce a phone number as specified above. Some of the formats are not valid or conformant to what other library / validations stipulate

Expected behavior

Any time I call Faker::PhoneNumber.phone_number_with_country_code I get a valid UK phone number

Additional context

Ofcom link: https://www.ofcom.org.uk/phones-and-broadband/phone-numbers/numbering-data
Validation issue I raised: giggsey/libphonenumber-for-php#726 (comment)
Problematic phone numbers are also contained (Non-exhaustive), on that issue raised in the php tracker. They pointed me to look here
Faker ref: https://github.com/faker-ruby/faker/blob/main/lib/locales/en-GB.yml#L98-L113

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions