tobischulz / trashmail-checker
Validates email addresses of known trashmail providers to keep away untrusted registrations.
Requires
- php: ^7.2|^8.0
Requires (Dev)
- orchestra/testbench: ~3.6.7 || ~3.7.8 || ~3.8.6 || ^4.8 || ^5.2 || ^6.0
- symfony/var-dumper: ^5.3
This package is auto-updated.
Last update: 2024-10-15 18:08:10 UTC
README
Validates email addresses of known trashmail/temporary mail/disposable mail providers, managed by your own database, to keep away unserious registrations.
Installation
You can install the package via composer:
composer require tobischulz/trashmail-checker
Publish all required assets:
php artisan vendor:publish --provider=TobiSchulz\TrashmailChecker\TrashmailCheckerServiceProvider
Migrate your database:
php artisan migrate
Usage
Validation Rule
use TobiSchulz\TrashmailChecker\Rules\NoTrashmail; class ValidateEmailController extends Controller { public function __invoke(Request $request) { $request->validate([ 'email' => ['required', 'email', 'bail', new NoTrashmail], ]); } }
Facade
use TobiSchulz\TrashmailChecker\Facade\TrashmailChecker; TrashmailChecker::check('taylor@trashmail.com');
Configuration
TrashmailChecker would let you disable the email check in development (env= local) by setting key TRASHMAIL_IN_DEVELOPMENT
to false
in your .env file.
TRASHMAIL_IN_DEVELOPMENT=false
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email tobias@byte.software instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.