2017 © Pedro Peláez
 

library disposable-email-validator

A PHP package to detect disposable emails based on multiple lists.

image

eusonlito/disposable-email-validator

A PHP package to detect disposable emails based on multiple lists.

  • Thursday, May 17, 2018
  • by eusonlito
  • Repository
  • 1 Watchers
  • 0 Stars
  • 68 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 79 % Grown

The README.md

Simple Disposable Email Validator

Downloads Packagist License MIT, (*1)

Validate emails against multiple databases with disposable email domains., (*2)

Current databases (domains, wildcard and whitelist):, (*3)

  • 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:, (*4)

composer require eusonlito/disposable-email-validator

Usage

Basic use of email validator against built-in domains list:, (*5)

<?php

require __DIR__.'/vendor/autoload.php';

use Eusonlito\DisposableEmail\Check;

// Simple
// Validate emailFilter, domain and wildcard

Check::email('me@my-email.com'); // true
Check::email('me@10minutemail.com'); // false

// Other methods

Check::emailFilter('me@my-email.com');     // Validate email with filter_var
Check::emailExpression('me@my-email.com'); // Validate email with regular expression
Check::domain('my-email.com');             // Validate domain and wildcard domains
Check::wildcard('my-email.com');           // Validate only wildcard domains

Integration with Laravel 5

To integrate this library with your Laravel 5.x project add the following line to the providers key within your config/app.php file:, (*6)

'providers' => [
    ...

    Eusonlito\DisposableEmail\Laravel\DisposableEmailServiceProvider::class

    ...
];

You can then use the library within your project like so:, (*7)

<?php
use InvalidArgumentException;
use Eusonlito\DisposableEmail\Check;

class Signup
{
    public function validate(Request $request)
    {
        if (!Check::email($request->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
        ]);
    }
}

The Versions

17/05 2018

dev-master

9999999-dev

A PHP package to detect disposable emails based on multiple lists.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

email validate spam emails disposable fake

17/05 2018

0.1.5

0.1.5.0

A PHP package to detect disposable emails based on multiple lists.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

email validate spam emails disposable fake

20/04 2018

0.1.4

0.1.4.0

A PHP package to detect disposable emails based on multiple lists.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

email validate spam emails disposable fake

07/11 2017

0.1.3

0.1.3.0

A PHP package to detect disposable emails based on multiple lists.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

email validate spam emails disposable fake

13/10 2017

0.1.2

0.1.2.0

A PHP package to detect disposable emails based on multiple lists.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

email validate spam emails disposable fake

11/10 2017

0.1.1

0.1.1.0

A PHP package to detect disposable emails based on multiple lists.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

email validate spam emails disposable fake

11/10 2017

0.1

0.1.0.0

A PHP package to detect disposable emails based on multiple lists.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

email validate spam emails disposable fake