PHPackages                             chriskonnertz/addresses - 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. chriskonnertz/addresses

AbandonedArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

chriskonnertz/addresses
=======================

Simple address validation

07PHP

Since Apr 16Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Address Validation
==================

[](#address-validation)

> ATTENTION: This repository is no longer maintained!

This PHP class tries to validate user input (name and address).

Instanciate without auto loading
--------------------------------

[](#instanciate-without-auto-loading)

```
require __DIR__.'/src/ChrisKonnertz/Addresses/Addresses.php';
require __DIR__.'/src/ChrisKonnertz/Addresses/ResultInterface.php';
require __DIR__.'/src/ChrisKonnertz/Addresses/Result.php';

$addresses = new \ChrisKonnertz\Addresses\Addresses();
```

> If you use auto loading via Composer you can skip the `require` statements.

Set API key
-----------

[](#set-api-key)

```
$addresses->setApiKey('your-api-key');
```

Set language code
-----------------

[](#set-language-code)

```
$addresses->setLanguage('de');
```

Validate data
-------------

[](#validate-data)

```
$result = $addresses->validate();
```

The `validate`method returns an object that implements `ReturnInterface`. Per default this is a `Result` object.

Check if result (data) is valid
-------------------------------

[](#check-if-result-data-is-valid)

```
$valid = $result->isValid();
```

If the data is not valid, the `$result` object contains an array of invalid values. Retrieve this array with `$result->getData()`.

Check if address has been corrected
-----------------------------------

[](#check-if-address-has-been-corrected)

The Google Geocache API tries to correct addresses for instance if the street name contains a spelling mistake. Use these methods to check the address state: `addressFound`, `addressNotFound` and `addressFoundAfterCorrection`

Example HTML form
-----------------

[](#example-html-form)

```

    Forename

    Last Name

    Postal Code

    Location

    Street

    House Number

    Country

`
```

Example PHP code
----------------

[](#example-php-code)

```
if (isset($_POST['submit'])) {
    // Assuming Composer auto loading
    $addresses = new \ChrisKonnertz\Addresses\Addresses();

    $addresses->setAll($_POST);

    $result = $addresses->validate();

    if ($result->isValid()) {
        echo 'Data is valid.';
    } else {
        echo 'Data is invalid!';
    }
}
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2548d359f2033681fd886f21a31406119a9ea3bd93dbec6f533f75f006f09228?d=identicon)[siconize](/maintainers/siconize)

---

Top Contributors

[![chriskonnertz](https://avatars.githubusercontent.com/u/4319323?v=4)](https://github.com/chriskonnertz "chriskonnertz (14 commits)")

### Embed Badge

![Health badge](/badges/chriskonnertz-addresses/health.svg)

```
[![Health](https://phpackages.com/badges/chriskonnertz-addresses/health.svg)](https://phpackages.com/packages/chriskonnertz-addresses)
```

###  Alternatives

[chaoswey/taiwan-id-validator

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

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

PHPackages © 2026

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