Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Mobile Number is a field type that provides mobile number validation and verification, and can be used for two factor authentication. It works with SMS Framework and TFA modules, respectively, and both features are optional.

The module differs from the Phone module in that it puts security and authenticity first, and focuses on mobile numbers which therefore assumes sms and smartphone capabilities by the user. The number is sanitized before saving, country is validated, the number is validated to be a mobile number type, allows uniqueness validation, and, if enabled, allows verifying number ownership by the user. For verification, codes are hashed and tokenized in the database. See the case for a dedicated mobile number field.

The module uses libphonenumber (developed by Google for use in Android) for validation, and supports the mobile number formats of the countries listed here, which is basically all of them.

Feature requests are welcomed.

Supported modules

Requirements

Installation D7

  1. Download and enable mobile_number module
  2. Download into your libraries folder the libphonenumber project under the name libphonenumber. Alternatively, you can use drush libphonenumber-download command, or install the library with Composer Manager.
  3. For mobile number verification, download, enable, and configure SMS Framework. You will need to setup an SMS gateway, which will require setting up an account and paying fees on a 3rd party service, or use SMS Framework's default logger gateway for testing.
  4. For two factor authentication, complete step 3 and download, enable, and configure TFA. Currently not available for Drupal 8.

Installation D8

  1. Install mobile_number module, preferably using composer composer require drupal/mobile_number
  2. If the module was not installed with composer, install dependencies with composer composer require giggsey/libphonenumber-for-php ^8.0
  3. For mobile number verification, download, enable, and configure SMS Framework. You will need to setup an SMS gateway, which will require setting up an account and paying fees on a 3rd party service, or use SMS Framework's default logger gateway for testing.
  4. Two factor authentication is not available for D8

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Dec 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.2 Stable Jan 16, 2024
2.0.1 Stable Dec 15, 2023