PHPackages                             ashvedov/email-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. ashvedov/email-validator

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

ashvedov/email-validator
========================

email valiadotr library

v1.0.1(3y ago)01MITPHP

Since Aug 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/DaaN88/php-email-validator)[ Packagist](https://packagist.org/packages/ashvedov/email-validator)[ RSS](/packages/ashvedov-email-validator/feed)WikiDiscussions main Synced 1mo ago

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

### Descriptions

[](#descriptions)

This package allows you to validate an email before actually sending mail to that email. Checking MX records occurs, including with the help of google.

### Getting started

[](#getting-started)

#### Requirements

[](#requirements)

- PHP 8.1.5+
- Composer 2+

#### Installation

[](#installation)

```
composer require ashvedov/email-validator

```

#### Usage

[](#usage)

Anywhere in your code, just include the class EmailValidator in the use section and you're good to go. It is possible to receive the result of the check as JSON, array or string.

#### Example

[](#example)

```
use Src\EmailValidator;

$validator = new EmailValidator(
    emails: [
        'simple@example.com',
        'very.common@example.com',
        'abc@example.co.uk',
        'disposable.style.email.with+symbol@example.com',
        'other.email-with-hyphen@example.com',
        'fully-qualified-domain@example.com',
        'user.name+tag+sorting@example.com',
        'example-indeed@strange-example.com',
        23,
        'help@otus.ru'
    ]
);
var_dump($validator->validate()->toArray());
```

##### Result

[](#result)

- array:

```
array(3) {
  [23]=>
  array(4) {
    [0]=>
    string(17) "filter_var_errors"
    [1]=>
    string(12) "regex_errors"
    [2]=>
    string(16) "mx_record_errors"
    [3]=>
    string(22) "world_mx_record_errors"
  }
  ["abc@example.co.uk"]=>
  array(2) {
    [0]=>
    string(16) "mx_record_errors"
    [1]=>
    string(22) "world_mx_record_errors"
  }
  ["example-indeed@strange-example.com"]=>
  array(2) {
    [0]=>
    string(16) "mx_record_errors"
    [1]=>
    string(22) "world_mx_record_errors"
  }
}

```

- JSON: `{"23":["filter_var_errors","regex_errors","mx_record_errors","world_mx_record_errors"],"abc@example.co.uk":["mx_record_errors","world_mx_record_errors"],"example-indeed@strange-example.com":["mx_record_errors","world_mx_record_errors"]}`
- String: `email [23] not valid, email [abc@example.co.uk] not valid, email [example-indeed@strange-example.com] not valid`

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

1361d ago

### Community

Maintainers

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

---

Top Contributors

[![DaaN88](https://avatars.githubusercontent.com/u/56934683?v=4)](https://github.com/DaaN88 "DaaN88 (2 commits)")

### Embed Badge

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

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

###  Alternatives

[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[robertogallea/laravel-codicefiscale

Codice fiscale validation for php/laravel

58151.6k1](/packages/robertogallea-laravel-codicefiscale)[speelpenning/laravel-postcode-nl

A Laravel client using the Postcode.eu REST API for Dutch address verification.

1221.1k](/packages/speelpenning-laravel-postcode-nl)

PHPackages © 2026

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