Skip to content

Phone numbers generated for EN_AU locale are invalid #3574

@chambois

Description

@chambois

Pre-Checks

Describe the bug

FakerJS for the EN_AU locale is currently generating invalid mobile phone numbers. I ran a test and it produced +61018806128, which is an invalid number as the third digit is not "4" (it always should be). Please see https://en.wikipedia.org/wiki/Telephone_numbers_in_Australia for further details.

Minimal reproduction code

import { fakerEN_AU as faker } from '@faker-js/faker'; 

phoneNumber = faker.phone.number({ style: 'international' });

// Output: `+61018806128`

// Expected output: `+61418806128`

Additional Context

In the meantime, I'm using this:

phone = faker.helpers.fromRegExp('+614[0-9]{8}');

This works, however it's more obscure and took additional time and effort searching to find this option. The faker.phone.number() should have worked to provide a valid number.

Environment Info

System:
    OS: macOS 15.5
    CPU: (12) arm64 Apple M2 Max
    Memory: 95.56 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.11.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.1 - ~/code/my-app/node_modules/.bin/npm
    pnpm: 9.7.1 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 138.0.7204.183
    Safari: 18.5
  npmPackages:
    @faker-js/faker: ^9.7.0 => 9.7.0

Which module system do you use?

  • CJS
  • ESM

Used Package Manager

npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions