Copy link to clipboard
Copied
Hi,
how can i valide the US and Internation Phone Number?
the phone field stored data like below
79587560052185
81-29-875-9853
49 2208 6004 232
713.445-7896,
(011) 32516988975,
7(459)_-542-6859
49-(0)8153-28-3219
i can tell it stored with all the diffrent format and don't know how to validate them.
thanks
Copy link to clipboard
Copied
There's no point trying. Even if you were only validating against a known pattern, that's still not to say the value is a valid phone number (which, at the end of the day, is what you want).
What precisely are you trying to gain by doing this validation (and don't say "making sure they're valid" ;-)?
--
Adam
Copy link to clipboard
Copied
You could use the isValid function, with type telephone or regex.
Copy link to clipboard
Copied
You could use the isValid function, with type telephone or regex.
The isValid() phone option only supports - somewhat jingoistically, IMO - US formats. Not much chop for most people out there, unfortunately.
--
Adam
Copy link to clipboard
Copied
Everything I thought has already been said, I just felt the need to show my appreciation for some excellent use of the word "jingoistically" there.
Incidentally, isValid("email") also sticks to no standards whatsoever.