juniorb2ss / laravel-extended-validation-rules
为laravel 5.5简化验证规则。
1.0.0
2017-09-05 17:37 UTC
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: ^6.3
- illuminate/support: ~5.5
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2024-09-26 08:01:23 UTC
README
使用Mailgun服务验证电子邮件
在.env文件中您需要定义您的api pub key
MAILGUN_PUBKEY=pubkey-5ogiflzbnjrljiky49qxsiozqef5jxp7
进行验证
use juniorb2ss\LaravelExtendedValidationRules\Rules\MailGunValidateEmailAddressRule; return Validator::make($inputs, [ 'name' => 'required|string|max:255', 'email' => [ 'required', 'string', 'max:255', 'unique:users', new MailGunValidateEmailAddressRule // to make validation in mailgun service ] ]);