public function MobileNumberUtilInterface::testMobileNumber in Mobile Number 2.0.x
Same name and namespace in other branches
- 8 src/MobileNumberUtilInterface.php \Drupal\mobile_number\MobileNumberUtilInterface::testMobileNumber()
Test mobile number validity.
Parameters
string $number: Number.
null|string $country: Country.
array $types: Mobile number types to verify as defined in \libphonenumber\PhoneNumberType.
Return value
\libphonenumber\PhoneNumber Libphonenumber Phone number object.
Throws
\Drupal\mobile_number\Exception\MobileNumberException Thrown if mobile number is not valid.
1 method overrides MobileNumberUtilInterface::testMobileNumber()
- MobileNumberUtil::testMobileNumber in src/
MobileNumberUtil.php - Test mobile number validity.
File
- src/
MobileNumberUtilInterface.php, line 92
Class
- MobileNumberUtilInterface
- Provides an interface for mobile number utility.
Namespace
Drupal\mobile_numberCode
public function testMobileNumber($number, $country = NULL, $types = [
1 => 1,
2 => 2,
]);