Yii2 validator to prevent using tempmail services or any variable domains
Go to file
2017-10-01 01:40:06 +03:00
src Switching to daveearley/daves-email-validation-tool 2017-10-01 01:40:06 +03:00
tests Switching to daveearley/daves-email-validation-tool 2017-10-01 01:40:06 +03:00
.gitignore Initial commit 2016-05-01 19:31:39 +03:00
CHANGELOG.md Initial commit 2016-05-01 19:31:39 +03:00
composer.json Switching to daveearley/daves-email-validation-tool 2017-10-01 01:40:06 +03:00
CONTRIBUTING.md Initial commit 2016-05-01 19:31:39 +03:00
LICENSE.md Initial commit 2016-05-01 19:31:39 +03:00
phpunit.xml.dist Initial commit 2016-05-01 19:31:39 +03:00
README.md Initial commit 2016-05-01 19:31:39 +03:00

Yii2 Tempmail Validator

Latest Version on Packagist Software License Total Downloads

Yii2 validator, based on https://github.com/elyby/php-tempmailbuster library and https://github.com/elyby/anti-tempmail-repo reference. Helps to protect you site from users, who use 10-minutes mail services.

Installation

Install the latest version with

$ composer require "ely/yii2-tempmail-validator:~1.0.0"

Usage

Once the extension is installed, simply use it in your models:

public function rules()
{
    return [
        [['email'], \Ely\Yii2\TempmailValidator::className()],
    ];
}

Also you can configure validator:

public function rules()
{
    return [
        [['email'], \Ely\Yii2\TempmailValidator::className(),
            'message' => '{attribute} is tempmail. You will not pass',
            'whiteList' => false,
            'secondaryStorage' => ['spam4\.me'],
        ],
    ];
}

Change log

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

This package was designed and developed within the Ely.by project team. We also thank all the contributors for their help.

License

The MIT License (MIT). Please see License File for more information.