Giter Club home page Giter Club logo

Comments (4)

IonBazan avatar IonBazan commented on September 25, 2024 1

@RPJamie @bramceulemans According to Wikipedia, +1 (620) 085-8074 is invalid because 085 is an invalid Central Office code - they may not start with 0 or 1. What is more, the last 2 digits of Central Office code may not be 11. These rules raise the complexity of E164 number faking dramatically and personally I don't think it's worth keeping it 100% compliant but PRs are welcome 😉

from faker.

bram-pkg avatar bram-pkg commented on September 25, 2024

I'm not sure I understand, from my understanding phone numbers can start with a + followed by a country code.

from faker.

stale avatar stale commented on September 25, 2024

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

from faker.

miken32 avatar miken32 commented on September 25, 2024

@IonBazan this is a simple check and anyway the code is already in place. In Faker\Provider\en_US\PhoneNumber simply change the format string to include the exchange code placeholder.

protected static $e164Formats = [
    '+1{{areaCode}}{{exchangeCode}}####',
];

None of the other en_US phone number formatters have this problem, just the e164 one.

Happy to create a PR if needed to fix this one LOC.

from faker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.