Skip to content

fix(isMobilePhone): fix macedonian mobile phone numbers validation #2497 - #2516

Closed
shaktisaluja wants to merge 2 commits into
validatorjs:masterfrom
shaktisaluja:fix-macedonian-phone-validation
Closed

shaktisaluja wants to merge 2 commits into
validatorjs:masterfrom
shaktisaluja:fix-macedonian-phone-validation

Conversation

@shaktisaluja

Copy link
Copy Markdown

Updated the isMobilePhone function to validate Macedonian mobile phone numbers correctly.

Changes:

  • Updated the regex to account for the valid Macedonian mobile phone prefixes (e.g., +389, 070, 071, etc.), ensuring that the validation works correctly for both local and international formats.

References:

  • Macedonian phone numbers typically start with country code +389 and are followed by a 9-digit local number.
  • The phone number formats considered are:
    • International: +389 XXX XXX XXX
    • Local: 070 XXX XXX, 071 XXX XXX, etc.

Comment thread src/lib/isMobilePhone.js Outdated
Co-authored-by: Panagiotis Skias <panagiotis.skias@gmail.com>
@skpanagiotis

Copy link
Copy Markdown

Also after a little searching, there is already a PR for North Macedonian mobile phone number. Check this #2500.

@shaktisaluja shaktisaluja closed this by deleting the head repository Apr 25, 2026
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.

3 participants