List Info

Thread: Validate_UK - improve phone number validation (fixes bug 9242)




Validate_UK - improve phone number validation (fixes bug 9242)
user name
2007-02-23 05:14:31
Hello,

Attached is a patch to improve the validation of UK phone
numbers.

I've changed the regular-expression used based on
information available  
 from Ofcom:
- allow numbers beginning 03 (national numbers)
- numbers beginning 01 or 08 may be 10 OR 11 digits (for
small towns, and  
old/in-use 0800 freephone numbers)
- all other numbers are 11 digits (previous reg-exp allowed
12-digit  
numbers)

I've added a couple of tests, and fixed an invalid test that
allowed a  
12-digit phone-number.

Sincerely,

Ash Searle


-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
Re: Validate_UK - improve phone number validation (fixes bug 9242)
user name
2007-02-23 07:53:19
Ash Searle wrote:
> Hello,
> 
> Attached is a patch to improve the validation of UK
phone numbers.

Thank you for this patch .. without having reviewed the
patch itself, as 
a general comment .. its best to attach patches to a bug
report. either 
directly in the bug report or with a url pointing to the
patch on some 
public server.

regards,
Lukas

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: Validate_UK - improve phone number validation (fixes bug 9242)
user name
2007-02-23 07:57:43
Thank you Ash, i'll try to contact the maintainer of
Validate_UK and
if I get no answer i'll proceed with the patching.

P.S. Could you please open a bug and attach the patch to the
problem ?
As Lukas explained.

Thanks, 

On 2/23/07, Lukas Kahwe Smith <mlspooteeweet.org> wrote:
> Ash Searle wrote:
> > Hello,
> >
> > Attached is a patch to improve the validation of
UK phone numbers.
>
> Thank you for this patch .. without having reviewed the
patch itself, as
> a general comment .. its best to attach patches to a
bug report. either
> directly in the bug report or with a url pointing to
the patch on some
> public server.
>
> regards,
> Lukas
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub
.php
>
>


-- 
David Coallier,
Founder & Software Architect,
Agora Production (http://agoraproduction.com
)
51.42.06.70.18

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: Validate_UK - improve phone number validation (fixes bug 9242)
user name
2007-02-23 08:20:02
Ash Searle wrote:
> Thanks Lukas,
> 
> Do you think the contribution instructions should be
modified to
> suggest attaching patches to bugs, and if so, are you
able to modify
> them? (at http://pear.php.net/manual/en/contributing.patches.php
)

Ah, sorry about this confusion .. could you maybe file a doc
bug to fix 
this to suggest filing a bug while you are at it? mailing
pear-dev might 
still be worthwhile .. but instead of mailing the patch i
think its 
better to mail a link to the bug report.

regards,
Lukas

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )