Skip to content

fix 'brazil +55' length size to account for 2 digits area code eg. 41999047777#11

Open
erickib wants to merge 1 commit intofonibo:mainfrom
erickib:main
Open

fix 'brazil +55' length size to account for 2 digits area code eg. 41999047777#11
erickib wants to merge 1 commit intofonibo:mainfrom
erickib:main

Conversation

@erickib
Copy link
Copy Markdown

@erickib erickib commented Feb 12, 2025

Ability to include area code + phone number.

@themisir
Copy link
Copy Markdown
Member

Could you please provide a sample phone number (not an actual one, just want to confirm if the implementation is alright).

@erickib
Copy link
Copy Markdown
Author

erickib commented Feb 14, 2025

Yes, sure. For landlines the size is 8, eg. 1234-5678.
Mobile lines are 9, ex. 12345-6789.
Area codes are 2 eg. (41). Examples are:
+55 (41) 99904-7177
+55 (16) 98304-5504
+55 (41) 4003-4138
Still learning this package, so let me know if anything else is needed.

@themisir
Copy link
Copy Markdown
Member

So excluding the country code (+55), can we say that the number (including area, operator, etc..) length will be either 10 or 11.

In that case we'll need LengthRule.range(10, 11) since .exact will not allow 10 digit numbers.

@erickib
Copy link
Copy Markdown
Author

erickib commented Mar 1, 2025

Yes you are right. Let me know if you need another PR to fix that.

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