Skip to content

Add Brunei (ms-BN) mobile phone number validation - #2820

Open
snehal242005 wants to merge 2 commits into
validatorjs:masterfrom
snehal242005:feat/add-mobile-phone-validation
Open

Add Brunei (ms-BN) mobile phone number validation#2820
snehal242005 wants to merge 2 commits into
validatorjs:masterfrom
snehal242005:feat/add-mobile-phone-validation

Conversation

@snehal242005

Copy link
Copy Markdown

Added mobile phone number validation for Brunei (locale: ms-BN) as part of the ongoing effort in #1761 to add missing country validations.

Brunei mobile numbers are 7 digits starting with 7 or 8, with an optional +673 country code prefix, per ITU numbering plan references.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ce62eb4) to head (82ac904).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2820   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2587      2587           
  Branches       656       656           
=========================================
  Hits          2587      2587           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@tux-tn tux-tn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your PR.

The regex currently accepts only 7 and 8 prefixes:

/^(\+?673)?[78]\d{6}$/

AITI's numbering plan also assigns +673 228 XXXX and +673 229 XXXX to mobile services. Valid numbers such as +6732281234 are currently rejected. Please add the 228 and 229 ranges with corresponding fixtures/tests.

See the official ITU Document (https://www.itu.int/dms_pub/itu-t/oth/02/02/T020200001F0002PDFE.pdf), table 2-3.

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.

2 participants