PHPackages                             giddyeffects/yii2-numverify - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. giddyeffects/yii2-numverify

ActiveYii2-extension[Validation &amp; Sanitization](/categories/validation)

giddyeffects/yii2-numverify
===========================

A Yii2 extension to use the NumVerify API, which offers a full-featured yet simple RESTful JSON API for national and international phone number validation and information lookup for a total of 232 countries around the world

09PHP

Since Apr 5Pushed 9y agoCompare

[ Source](https://github.com/giddyeffects/yii2-numverify)[ Packagist](https://packagist.org/packages/giddyeffects/yii2-numverify)[ RSS](/packages/giddyeffects-yii2-numverify/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Global Phone Number Validation and Information Lookup using Numverify API
=========================================================================

[](#global-phone-number-validation-and-information-lookup-using-numverify-api)

A Yii2 extension to use the NumVerify API, which offers a full-featured yet simple RESTful JSON API for national and international phone number validation and information lookup for a total of 232 countries around the world

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist "giddyeffects/yii2-numverify":"@dev"

```

or add

```
"giddyeffects/yii2-numverify": "@dev"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

First get an Numverify API key [here](https://numverify.com/product).

Once the extension is installed, simply add the following code in your application configuration:

```
return [
    //....
    'components' => [
        //...
        'numverify' => [
            'class' => 'giddyeffects\numverify\Numverify',
            'access_key' => 'YOUR_NUMVERIFY_API_KEY',
        ],
    ],
];
```

You can now access the extension via `\Yii::$app->numverify;`

For more details refer to the [Numverify Documentation](https://numverify.com/documentation).

Example
-------

[](#example)

```
$response = \Yii::$app->numverify->verify(4158586273, ['country_code'=>'us']);
//check if there's an error
if ($response->error){
    echo $response->error->info;
}
else{
    if($response->valid=='1'){
        echo "Number '$response->number' is valid.";
        echo "";
        echo "local_format: $response->local_format";
        echo "";
        echo "international_format: $response->international_format";
        echo "";
        echo "country_prefix: $response->country_prefix";
        echo "";
        echo "country_code: $response->country_code";
        echo "";
        echo "country_name: $response->country_name";
        echo "";
        echo "location: $response->location";
        echo "";
        echo "carrier: $response->carrier";
        echo "";
        echo "line_type: $response->line_type";
        echo "";
    }
    else{
        echo "Number given is not valid.";
    }
}

```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25964401?v=4)[Gideon Nyaga](/maintainers/giddyeffects)[@giddyeffects](https://github.com/giddyeffects)

---

Tags

information-lookupyii2-extension

### Embed Badge

![Health badge](/badges/giddyeffects-yii2-numverify/health.svg)

```
[![Health](https://phpackages.com/badges/giddyeffects-yii2-numverify/health.svg)](https://phpackages.com/packages/giddyeffects-yii2-numverify)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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