/** * Check whether a short number is a possible number when dialled from a region, given the number * in the form of a string, and the region where the number is dialled from. This provides a more * lenient check than {@link #isValidShortNumber}. * * @param $shortNumber String The short number to check * @param $regionDialingFrom String Region dialing From * @return boolean whether the number is a possible short number */ public function isPossibleShortNumberForRegion($shortNumber, $regionDialingFrom) { $phoneMetadata = $this->getMetadataForRegion($regionDialingFrom); if ($phoneMetadata === null) { return false; } $generalDesc = $phoneMetadata->getGeneralDesc(); return $this->phoneUtil->isNumberPossibleForDesc($shortNumber, $generalDesc); }