PHPackages                             aziraphale/email-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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. aziraphale/email-address-validator

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

aziraphale/email-address-validator
==================================

Fork of AddedBytes' PHP EmailAddressValidator script, now with Composer support!

2.0.1(8y ago)18.2k↓40%1[1 issues](https://github.com/aziraphale/email-address-validator/issues)MITPHPCI failing

Since Jan 3Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (4)Used By (0)

Email-Address-Validator
=======================

[](#email-address-validator)

This is a fork of [AddedBytes' EmailAddressValidator class](https://code.google.com/p/php-email-address-validation/).

Changes
-------

[](#changes)

Changes include:

- [Composer](https://getcomposer.org/) support
- Refactored the class to be purely static
- Opened up methods for checking the "local part" (the bit before the `@`) and the "domain part" (after the `@`) to be public methods
- Additional code style and docblock fixing to properly follow the [PHP-FIG PSR-1](http://www.php-fig.org/psr/psr-1/)and [PSR-2](http://www.php-fig.org/psr/psr-2/) documents

Note that this class is still **un-namespaced** - i.e. it's still declared in the global namespace. The `composer.json`file is still set up to correctly load it when required, so this shouldn't be a problem in practice - it's just perhaps not best-practice.

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

[](#installation)

Use [Composer](https://getcomposer.org/):

```
php composer.phar require aziraphale/email-address-validator:^2

```

If you don't want to use Composer (why not?!), just download the `EmailAddressValidator.php` file, save it with your project, and `require` it where needed.

Note that this updated version is **version 2.0.0**. I have kept the original class tagged as **version 1.0.10** (it was the 10th commit to the Google Code svn repository). If you want to use Composer to install the **old** class, simply specify `^1` as the version constraint (which will allow for backwards-compatible changes to be installed, if any get made, while never jumping to my modified class without your direct action):

```
php composer.phar require aziraphale/email-address-validator:^1

```

Usage
-----

[](#usage)

Due to the aforementioned changes, the way of using this class has completely changed. However it has such a small and simple interface that these changes shouldn't be problematic.

As a recap, the **old usage** was like this:

```
$validator = new EmailAddressValidator;
if ($validator->check_email_address('test@example.org')) {
    // Email address is technically valid
}
```

The **new syntax** is as follows (ensure you have already included Composer's `autoload.php` file!):

```
if (EmailAddressValidator::checkEmailAddress("test@example.org")) {
    // Email address is technically valid
}
```

with a couple of additional methods in case they're helpful:

```
if (EmailAddressValidator::checkLocalPortion("test")) {
    // "test" is technically a valid string to have before the "@" in an email address
}
if (EmailAddressValidator::checkDomainPortion("example.org")) {
    // "example.org" is technically a valid email address host
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% 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 ~435 days

Total

3

Last Release

3283d ago

Major Versions

1.0.10 → 2.0.02015-01-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2dd884f3c4a26c3baf2743c6fc683275a4961a574be84da7611160fcfe55bc8?d=identicon)[aziraphale](/maintainers/aziraphale)

---

Top Contributors

[![aziraphale](https://avatars.githubusercontent.com/u/1239323?v=4)](https://github.com/aziraphale "aziraphale (14 commits)")[![splitbrain](https://avatars.githubusercontent.com/u/86426?v=4)](https://github.com/splitbrain "splitbrain (3 commits)")[![reetp](https://avatars.githubusercontent.com/u/3800384?v=4)](https://github.com/reetp "reetp (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)[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)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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