ISPHONE
Checks whether a string is a valid phone number.
Syntax
ISPHONE(text, [locale], [options])
Arguments
text
: The phone number string to test.locale
(optional): Locale code (e.g.,"en-US"
,"any"
). Defaults to"any"
.options
(optional): Object with settings such as{ strictMode: true }
.
Example
ISPHONE("202-555-0187", "en-US") → TRUE
ISPHONE("12345", "en-US") → FALSE