ADMIN_PhoneNumber_IsValid

Deprecated. Don't use for new development and try to migrate existing uses.

Type: Scalar function

This function answers the question whether a given string is a possibly valid phone number.

Supported input formats:

  • The number may include separators used to make it more readable (international numbers must include at least one separator after the country code). The prefered separator is the space-character but the hyphen is also allowed.

  • The leading part of the national number may be put into parentheses to indicate that those digits are not always dialed. The use of separators inside the parenteses is not allowed.

  • A leading plus-character is allowed and indicates an international number. The country code (i.e. the digits between the plus and the first separator) must be between 1 and 3 characters long.

  • Numbers with less than 8 digits are considered unreasonably short and are thus not allowed.

Examples of valid numbers:
08-123456789
08 - 123 456 789
(08) 123456789
+46 (0)8 123456789

Note: The special case of a null-string will give a return value of 0.

Return value: bit

A bit indicating if the supplied number is a valid phone number.

Parameters

@PhoneNumber mandatory varchar(50)
A phone number.