Uh oh!
There was an error while loading. Please reload this page.
Fixed mobile phone validation for pt-br - #1671
Conversation
profnandaa
left a comment
There was a problem hiding this comment.
LGTM. thanks for your contrib!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #1671 +/- ##
=========================================
Coverage 100.00% 100.00% =========================================
Files 101 101 Lines 1854 1854 =========================================
Hits 1854 1854 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nandoofz
commented
Jun 7, 2021
Hi @profnandaa, any idea when this PR will be merged and a new version will be released? |
| '5501599623874', | ||
| '+55012962308', | ||
| '+55 015 1234-3214', | ||
| '+55 11 91431-4567', |
There was a problem hiding this comment.
Why were these removed, did you introduce a regression? I can't see it from the code change...
There was a problem hiding this comment.
Hey @profnandaa. I've removed because the previous rule was blocking numbers starting with 1 after 9 and those are valid brazilian numbers, so I've replaced for invalid numbers starting with 0 after 9. In this PR from last year it was added, but they aren't invalid numbers.
profnandaa
commented
Jul 16, 2021
Sorry this skipped my previous review; we should merge it next. See my 1 comment above. |
nandoofz
commented
Oct 5, 2021
Hi @profnandaa, any updates? 😃 |
| 'nn-NO': /^(\+?47)?[49]\d{7}$/, | ||
| 'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/, | ||
| 'pt-BR': /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[2-9]{1}\d{3}\-?\d{4}))$/, | ||
| 'pt-BR': /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/, |
There was a problem hiding this comment.
This seems to be heavy redoxable, it was also before this PR, however.
Based on this previous PR #1407:
Changed RegExp for pt-br phone number validation, now supporting new numbers that start with 9 and are followed by 1 that isn't common, but it's possible as you can see on Google's libphonenumber validation.