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 2mo 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 10% 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://www.gravatar.com/avatar/1635c2f3e21c415638f110ef348417610db80000bf5e4e13d63ff7b380d37333?d=identicon)[giddyeffects](/maintainers/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

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)

PHPackages © 2026

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