Skip to content

feat: add Romanian phone number validation - #18

Merged
Robert-GeorgeDev merged 1 commit into
Robert-GeorgeDev:mainfrom
Aaqibhafeezkhan:feat/romanian-phone-number-validator
Nov 11, 2026
Merged

Robert-GeorgeDev merged 1 commit into
Robert-GeorgeDev:mainfrom
Aaqibhafeezkhan:feat/romanian-phone-number-validator

Conversation

@Aaqibhafeezkhan

Copy link
Copy Markdown
Contributor

Summary

  • Add validatePhoneRo and isValidPhoneRo for Romanian mobile and landline numbers.
  • Accept national, +40, and 0040 prefixes and normalize valid numbers to E.164 format.
  • Return the normalized number in data.normalized and Romanian error messages for invalid input.
  • Add tests for normalization, international prefixes, landlines, and invalid formats.
  • Update public exports, README documentation, and the Unreleased changelog.

Closes #10.

@Aaqibhafeezkhan Aaqibhafeezkhan left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed phone number normalization, supported prefixes, mobile and landline formats, Romanian error messages, and the test cases.

@Aaqibhafeezkhan

Copy link
Copy Markdown
Contributor Author

Hi @Robert-GeorgeDev

Please review/merge

@Robert-GeorgeDev
Robert-GeorgeDev merged commit 7054043 into Robert-GeorgeDev:main Nov 11, 2026

Copy link
Copy Markdown
Owner

Thanks @Aaqibhafeezkhan, merged together with #17 in #19. Both PRs touched the same lines in the README and src/index.ts, so I resolved the conflict there and kept both validators.


Generated by Claude Code

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.

Add a validator for Romanian phone numbers

2 participants