PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Validate » Validate_UK » Bug #9242

Error in telephone checking

Details

Submitted2006-11-06 11:25 UTC
Fromwebmaster at webit dot co dot uk
Assignedarpad
StatusClosed
PackageValidate_UK
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2006-11-06 11:25 UTC] webmaster at webit dot co dot uk

Description:
------------
I've noticed an error in the checking of the UK telephone numbers. In the error check, it does indeed go through and check that numbers should be 11 characters long, however outside of London, 10 character numbers are still allowed. One example being 01905 22222 - which is actually an estate agents!

Test script:
---------------
n/a

Expected result:
----------------
10 character numbers, that don't start 02 should be accepted.

Actual result:
--------------
They fail.

[2007-02-23 14:34 UTC] ash at hexmen dot com

Ofcom dictates the UK numbering scheme, and provides downloadable files detailing precisely which area codes contain 10-digit numbers.
http://www.ofcom.org.uk/telecoms/ioi/numbers/numbers_administered/

A 'good enough' fix should be to accept 10-digits for numbers beginning '01' and '08'. All other numbers should be 11-digits.

Note: at the present-time (Feb 2007) UK numbers cannot begin '04' or '06'

A patch to fix this bug is available here:
http://hexmen.com/code/patches/pear-9242.diff