PHPackages                             lekoala/silverstripe-phonenumber - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. lekoala/silverstripe-phonenumber

ActiveSilverstripe-vendormodule[Localization &amp; i18n](/categories/localization)

lekoala/silverstripe-phonenumber
================================

Format, store and validate phone number in SilverStripe

1.1.0(2y ago)32.8k↓64.3%2[1 PRs](https://github.com/lekoala/silverstripe-phonenumber/pulls)MITPHPPHP ^7.4 || ^8CI failing

Since Mar 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lekoala/silverstripe-phonenumber)[ Packagist](https://packagist.org/packages/lekoala/silverstripe-phonenumber)[ GitHub Sponsors](https://github.com/lekoala)[ RSS](/packages/lekoala-silverstripe-phonenumber/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

SilverStripe PhoneNumber module
===============================

[](#silverstripe-phonenumber-module)

[![Build Status](https://github.com/lekoala/silverstripe-phonenumber/actions/workflows/ci.yml/badge.svg)](https://github.com/lekoala/silverstripe-phonenumber/actions/workflows/ci.yml/badge.svg)[![scrutinizer](https://camo.githubusercontent.com/474e756575dc10f1509fe785c4224b4f8dfa9c659ff8a44252f28cf116b21fa2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c656b6f616c612f73696c7665727374726970652d70686f6e656e756d6265722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lekoala/silverstripe-phonenumber/)[![Code coverage](https://camo.githubusercontent.com/dde6fb106cef94e8a40bc6670d4841478d8e761a32ae02da140b8c35cfa1644f/68747470733a2f2f636f6465636f762e696f2f67682f6c656b6f616c612f73696c7665727374726970652d70686f6e656e756d6265722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/lekoala/silverstripe-phonenumber)

Intro
-----

[](#intro)

Provide some helper services to deal with phone numbers in SilverStripe

This module integrates libphonenumber as the utility to parse and validate phonenumbers.

Most of the time, it's a good idea to set the country of the phone number. Otherwise, current locale will be used.

Sample code:

```
	$phone = new PhoneField('phone', 'Phone number');
	$phone->setCountryField('CountryCode');

	$validator = ZenValidator::create();
	$validator->setConstraint('phone', Constraint_remote::create('/__phonenumber/validate',null,array('data' => array('country' => 'BE'))));
```

This module also provide an extension to apply to dataobject, for example to members

```
SilverStripe\Security\Member:
  extensions:
    - LeKoala\PhoneNumber\PhoneNumberExtension
```

Phone DBField
-------------

[](#phone-dbfield)

You can set your DataObject db field to Phone or DBPhone::class

This will automatically scaffold a CountryPhoneField which is a combo field with a country dropdown (with list of prefixes) and a space for the field itself

Form fields
-----------

[](#form-fields)

Two available fields:

- PhoneField : a plain phone field that supports national and international numbers
- CountryPhoneField : a combo field with a country dropdown + national phone number

Ajax validation and formatting
------------------------------

[](#ajax-validation-and-formatting)

Expose ´**phonenumber/validate´ and ´**phonenumber/format´ endpoints for validation and formatting of phone numbers

Todo
----

[](#todo)

None

Compatibility
-------------

[](#compatibility)

Tested with 5.x but should work on any ^4|^5 projects

Maintainer
----------

[](#maintainer)

LeKoala -

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~898 days

Total

4

Last Release

1059d ago

Major Versions

0.1 → 1.x-dev2016-03-25

PHP version history (2 changes)1.0.0PHP &gt;=7.2

1.1.0PHP ^7.4 || ^8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/250762?v=4)[Thomas Portelange](/maintainers/lekoala)[@lekoala](https://github.com/lekoala)

---

Top Contributors

[![lekoala](https://avatars.githubusercontent.com/u/250762?v=4)](https://github.com/lekoala "lekoala (28 commits)")

---

Tags

phonenumbersilverstripei18nsilverstripephonenumbercmsmodule

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lekoala-silverstripe-phonenumber/health.svg)

```
[![Health](https://phpackages.com/badges/lekoala-silverstripe-phonenumber/health.svg)](https://phpackages.com/packages/lekoala-silverstripe-phonenumber)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[silverstripe/translatable

Allows translation of DataObject and SiteTree records into multiple languages

52199.3k8](/packages/silverstripe-translatable)[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39344.8k31](/packages/lekoala-silverstripe-cms-actions)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

91437.9k29](/packages/tractorcow-silverstripe-fluent)[imaginaerum/magento2-language-fr-fr

Magento2 French Language Pack (fr\_FR)

43754.8k2](/packages/imaginaerum-magento2-language-fr-fr)[lekoala/silverstripe-softdelete

Soft delete extension for SilverStripe

11236.3k](/packages/lekoala-silverstripe-softdelete)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
