0151 355 4555

IsValid

Description

Checks a telephone number for validity.

The service returns a code indicating the status of the telephone number. This code can be one of the following values:

Code Name Description
VALID Valid Number Indicates that the number is valid and callable.
INVALID Invalid Number Indicates that the number is invalid and therefore not callable.
TEMPINVALID Temporarily Invalid Temporary network error which is not predicted to last for an extended period.
NUMBERCHANGED Number Changed Indicates that the number tested has been changed. If the number is called from a telephone you will be told an alternative number.
FOREIGN Foreign Number Indicates that the number is foreign and we are unable to validate it.
MOBILE Mobile Number Indicates that the number is a mobile and we are unable to validate it using this service.
ERROR Error Unable to validate due to temporary error on the telephone network.
AMBIGUOUS Ambiguous

Ambiguous result – telephone number probably needs to be manually tested.

In normal circumstances you should only receive the first three status codes. If you receive one of the final three status codes, we will investigate the cause and attempt to ensure it does not happen again, and you will not be charged for the query.

This service is not appropriate if you require an absolute indication that a telephone number is valid for a particular individual. In those circumstances, you should consider the use of a telephone number capture service.

Options:

AllowedPrefixes
A comma-separated list of prefixes in standard international format that the number must start with to be treated as valid. For example, use "+441,+442" to allow only standard UK landline numbers.

BarredPrefixes
A comma-separated list of prefixes in standard international format that will cause the number to be treated as invalid. For example, use "+4470,+449" to block any personal non-geographic or premium rate numbers.

View all Live Number Testing (part of the of the phone validation suite) methods

Code Samples

<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="https://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">
</script>

<script type="text/javascript">

function loadIntegr8() {
  // Load the TelephoneLineValidation Integr8 service
  data8.load('TelephoneLineValidation');
}

function IsValid(number) {
  /// <param name="number">string</param>
  var telephonelinevalidation = new data8.telephonelinevalidation();
  
  telephonelinevalidation.isvalid(
    number,
    null,
    showIsValidResult
  );
}

function showIsValidResult(result) {
  // Check that the call succeeded, and show the error message if there was a problem.
  if (!result.Status.Success) {
    alert('Error: ' + result.Status.ErrorMessage);
  }
  else {
    // TODO: Process method results here.
    // Results can be extracted from the following fields:
    // result.Result
    //   Indicates if the telephone number is found to be valid.
  }
}

loadIntegr8();

</script>