Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/eusonlito/disposable-email-validator
- Owner: eusonlito
- License: mit
- Created: 2017-10-11T20:26:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T12:58:53.000Z (over 1 year ago)
- Last Synced: 2024-09-18T11:56:36.184Z (about 2 months ago)
- Language: PHP
- Size: 1.21 MB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
]);
}
}
```