Skip to content

fix(locale): phone numbers for en_AU#3788

Merged
ST-DDT merged 1 commit intofaker-js:nextfrom
hiSandog:fix/phone-en-au-international-format
Apr 6, 2026
Merged

fix(locale): phone numbers for en_AU#3788
ST-DDT merged 1 commit intofaker-js:nextfrom
hiSandog:fix/phone-en-au-international-format

Conversation

@hiSandog
Copy link
Copy Markdown
Contributor

@hiSandog hiSandog commented Apr 5, 2026

Description

Australian phone numbers were generating invalid numbers because the area code was left as a wildcard (#) allowing 0 and 1 as the first digit, producing numbers like +61018806128 which are not valid Australian phone numbers.

Changes

  • International format: Replace +61######### with explicit area codes
    • Landlines: +612, +613, +617, +618 (NSW/ACT, VIC/TAS, QLD, SA/NT/WA)
    • Mobile: +614
  • National format: Replace (0#) #### #### with explicit area codes
    • Landlines: 02, 03, 07, 08
    • Mobile: 04
  • Human readable format: Replace 0# #### #### and +61 # #### #### with explicit area codes

Reference: Telephone numbers in Australia (Wikipedia)

Related Issue

Closes #3574

Australian phone numbers were generating invalid numbers because the
area code was left as a wildcard (#) allowing 0 and 1 as the first digit.

- International: replace '+61#########' with explicit area codes
  (+612, +613, +617, +618 for landlines, +614 for mobiles)
- National: replace '(0#) #### ####' with explicit area codes
  (02, 03, 07, 08 for landlines, 04 for mobiles)
- Human: replace '0# #### ####' and '+61 # #### ####' with
  explicit area codes

See: https://en.wikipedia.org/wiki/Telephone_numbers_in_Australia
Closes: faker-js#3574
@hiSandog hiSandog requested a review from a team as a code owner April 5, 2026 07:39
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 5, 2026

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e486814
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/69d211a10446c80008ddcb99
😎 Deploy Preview https://deploy-preview-3788.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.88%. Comparing base (ed36f5c) to head (e486814).
⚠️ Report is 4 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3788   +/-   ##
=======================================
  Coverage   98.88%   98.88%           
=======================================
  Files         886      886           
  Lines        3061     3061           
  Branches      556      540   -16     
=======================================
  Hits         3027     3027           
  Misses         30       30           
  Partials        4        4           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Maybe reduce/remove the redundant comments.

@ST-DDT
Copy link
Copy Markdown
Member

ST-DDT commented Apr 5, 2026

@chambois Could you please review this PR as well?

@ST-DDT ST-DDT changed the title fix(locale): ensure valid phone numbers for en_AU fix(locale): phone numbers for en_AU Apr 6, 2026
@ST-DDT ST-DDT added this pull request to the merge queue Apr 6, 2026
Merged via the queue into faker-js:next with commit eba7d99 Apr 6, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phone numbers generated for EN_AU locale are invalid

4 participants