PHPackages                             dsposito/address-validator - 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. dsposito/address-validator

ActiveLibrary

dsposito/address-validator
==========================

Address validator that support multiple validation 3rd-parties.

v0.2.0(9y ago)352MITPHPPHP ^7.0

Since Mar 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dsposito/address-validator)[ Packagist](https://packagist.org/packages/dsposito/address-validator)[ Docs](https://github.org/dsposito/address-validator)[ RSS](/packages/dsposito-address-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Address Validator
=================

[](#address-validator)

[![Build Status](https://camo.githubusercontent.com/be51c5cd80421ac15d4012de608625a7f12705b08d131bbd0fa72faf76146356/68747470733a2f2f7472617669732d63692e6f72672f6473706f7369746f2f616464726573732d76616c696461746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dsposito/address-validator)[![Coverage Status](https://camo.githubusercontent.com/07930b2ba0e7156df80916cea8f97cb8e48f9518e9c57600e1e9b7a449c4c8e7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6473706f7369746f2f616464726573732d76616c696461746f722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/dsposito/address-validator?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/2c211d1ef23570b5bb333380a9acbf4410f53da10dc34c4134b786a2e17b063f/68747470733a2f2f706f7365722e707567782e6f72672f6473706f7369746f2f616464726573732d76616c696461746f722f762f737461626c652e706e67)](https://packagist.org/packages/dsposito/address-validator)

Overview
--------

[](#overview)

An address validator adapter that supports a variety of third-party validators.

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

[](#installation)

Run the following [composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) command to add the package to your project:

```
composer require dsposito/address-validator

```

Alternatively, add `"dsposito/address-validator": "^0.1"` to your composer.json file.

Usage
-----

[](#usage)

```
$provider = Provider::instance(
    'usps',
    [
        'endpoint' => 'http://production.shippingapis.com/ShippingAPI.dll',
        'user_id' => 'SK297O2B7BF221',
    ]
);

$address = $provider->validate(new Address([
    'name' => 'Elon Musk',
    'street1' => '3500 Deer Creek Road',
    'city' => 'Palo Alto',
    'state' => 'CA',
    'zip' => '94304',
    'country' => 'US',
]));
```

Tests
-----

[](#tests)

To run the test suite, run the following commands from the root directory:

```
composer install
vendor/bin/phpunit -d usps_user_id=YOUR_USPS_ID -d easypost_api_key=YOUR_EASYPOST_KEY

```

> **Note:** Valid API keys are required when running the integration tests.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~8 days

Total

3

Last Release

3334d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45855ca47dca22521841f5356ed50f8d9e2158ceb89d7e85fba660f55fb99525?d=identicon)[dsposito](/maintainers/dsposito)

---

Top Contributors

[![dsposito](https://avatars.githubusercontent.com/u/1553251?v=4)](https://github.com/dsposito "dsposito (25 commits)")

---

Tags

address-validationaddress-verificationeasypostphpuspsphpaddressuspseasypostaddress validator

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dsposito-address-validator/health.svg)

```
[![Health](https://phpackages.com/badges/dsposito-address-validator/health.svg)](https://phpackages.com/packages/dsposito-address-validator)
```

###  Alternatives

[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[jstewmc/usps-address

A simple PHP class for United States Postal Service (USPS) addresses

1211.0k](/packages/jstewmc-usps-address)

PHPackages © 2026

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