Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eusonlito/disposable-email-validator

Validate emails against multiple databases with disposable email domains
https://github.com/eusonlito/disposable-email-validator

Last synced: about 1 month ago
JSON representation

Validate emails against multiple databases with disposable email domains

Awesome Lists containing this project

README

        

# Simple Disposable Email Validator

[![Downloads](https://img.shields.io/packagist/dt/eusonlito/disposable-email-validator.svg)](https://packagist.org/packages/eusonlito/disposable-email-validator)
[![Packagist](http://img.shields.io/packagist/v/eusonlito/disposable-email-validator.svg)](https://packagist.org/packages/eusonlito/disposable-email-validator)
[![License MIT](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/eusonlito/disposable-email-validator/blob/master/LICENSE)

Validate emails against multiple databases with disposable email domains.

Current databases (domains, wildcard and whitelist):

* https://github.com/ivolo/disposable-email-domains
* https://github.com/MattKetmo/EmailChecker
* https://github.com/fgribreau/mailchecker
* https://github.com/martenson/disposable-email-domains

## Installation

Via [Composer](http://getcomposer.org/):

```
composer require eusonlito/disposable-email-validator
```

## Usage

Basic use of email validator against built-in domains list:

```php
[
...

Eusonlito\DisposableEmail\Laravel\DisposableEmailServiceProvider::class

...
];
```

You can then use the library within your project like so:

```php
input('email'))) {
throw new InvalidArgumentException('Invalid email');
}
}

public function getValidator(array $data)
{
return Validator::make($data, [
'email' => 'required|email|disposable_email' // Use after email validator
]);
}
}
```