answer re: PHP preg_match for validating 10 digit mobile number
...
For further actions, you may consider blocking this person and/or reporting abuse
For further actions, you may consider blocking this person and/or reporting abuse
I don't think that's a particularly good answer, or something that can be generalised like that.
It presumes not only the things the asker is looking for - a number is 11 or 15 digits long and may or may not start with a
+- but that the first digit isn't zero.Most people in my country (UK) will enter their mobile number starting
07, because that's the most common prefix and0means "stand by telephone exchange because I'm about to hit you with a national number".The trouble is, not all phones are mobile, not all mobiles have to start with a
7, people have redirected numbers in the same way they might have P.O. Boxes, and people may or may not want to use an internationalised number.I guarantee any site using a regex (or expanded set of rules) like this one will have a small number of annoyed users who can't seem to put in their perfectly legitimate number.