Skip to content

Conversation

@Spudley
Copy link

@Spudley Spudley commented Oct 16, 2019

I have made a small modification to the en-GB mobile phone validator.

Mobile phone numbers in the UK always begin with 07. This is well known and was already being validated.

However, the next digit after 07 cannot be any digit; it can only be 1-9. Numbers starting 070 are not mobile numbers, they are in fact a rarely used form of premium rate number.

It is important for a validator to distinguish that 070 numbers are not mobiles as fraudsters have been known to use 070 numbers by fooling people into calling it, thinking they're calling a mobile, and then make money from the premium rate.

Therefore, I have modified the regex pattern for en-GB mobiles to exclude 070 numbers.

I have also added an 070 number to the tests, along with a couple of other non-mobile numbers to make sure the tests cover all the bases.

Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

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

Please un-stage the changes that are not to do with the PR.

@profnandaa profnandaa added the closed-as-stale For stale issues and PRs label Mar 22, 2020
@profnandaa profnandaa closed this Mar 22, 2020
@ihmpavel ihmpavel mentioned this pull request May 18, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed-as-stale For stale issues and PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants