On Mon, 10 Mar 2008 15:56:54 +1300, "Pete Dashwood"
<dashwood@[EMAIL PROTECTED]
> wrote:
>Jeff, here's a thought: Why validate phone numbers at all?
>
>They are NOT valid unless you actually dial them and get a pick up.
>
>Phone numbers can contain all kinds of characters: +64 7 1234567,
>1-800-CALLME, ... not just dashes. It is a pointless validation.
>
>The primary use of this information is so a Human can use it to make a
call.
>Humans can see immediately whether what is recorded is a phone number or
>not.
I agree 100%. I get so frustrated when a web application doesn't
accept my 80226-2895 zip code, or a phone number has to be entered
with dashes but not parenthesis around the area code, etc.
The only time it needs to be validated in most applications is if the
computer is expected to make a phone call.
I did work for a company that handled subscription request cards. We
needed to do data validation of addresses from around the world. It
was more of a data cleansing thing though. We had a dirty word file
and were looking for joke entries. A harder thing to look for was
duplicate entries that weren't quite filled in the same way. Not an
easy task.
Doing that I learned that there are lots of postal code syntaxes
around the world. But unless you have data cleansing to do, just
make your field large enough to handle any of the postal codes, and
accept whatever they gave you. We're not doing arithmetic with it.
For data cleansing, the check for valid SSaN will be more complete
than the one the OP gave.


|