marcel-strahl / temporary-email-validator
Laravel 的临时电子邮件地址验证器
v3.0.0
2023-01-23 23:19 UTC
Requires
- php: ^8.0
- illuminate/console: ^8|^9
- illuminate/routing: ^8|^9
- illuminate/support: ^8|^9
- jprangenbergde/temporary-email-detection: ^1.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.13
- orchestra/testbench: ^6.18|^7.5
- phpstan/phpstan: ^1.9
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^9.5
README
识别临时电子邮件地址作为 Laravel 验证规则
安装
composer require marcel-strahl/temporary-email-validator
从 5.3 版本开始,您不需要以下步骤,因为我们使用 Laravel 的 Discover 加载我们的包。将 ServiceProvider 添加到 config/app.php
MarcelStrahl\TemporaryValidator\TemporaryValidatorServiceProvider::class,
将规则(名为 not_temporary_email 的规则)像任何其他规则一样添加到您想使用的验证器中
$rules = ['required|email|not_temporary_email'];
提示
我不是 "临时电子邮件检测" 的创建者,但我已经将以下包改成了 Laravel 验证规则!
主要包 Temporary E-Mail Detection
: https://github.com/jprangenbergde/temporary-email-detection