Phone Number Verifier
AllisonKennedy - I guess my thinking was to be thorough. I think it comes into play if the numbers are short. So, for example you grab the last 4 digits but there are only 3 digits to grab. I don't know, like most things I create, they can almost always be optimized! π
Greg_Deckler You're like me, always over thinking and over engineering things. π Now you've got me too interested in this one, lol.
OK, so your LEN check is required if they for example type:
800-588-230
and miss the last digit (but everything else passes the check), so perhaps it is needed after all.
I still have one scenario that needs fixed in your formula, what if they type:
800-588-23001
That's not a valid phone number, but passes all your checks.
Also, being a non-US resident now, I'd love to see it handle this format:
1-800-588-2300
as valid (or even tell me three cases: "Valid No Country Code", "Valid with Country Code", "Invalid") but now I'm just getting picky.