stuyam/laravel-kickbox-validator
最新稳定版本:1.0.3
Composer 安装命令:
composer require stuyam/laravel-kickbox-validator
包简介
A kickbox email validator for form requests in laravel
README 文档
README
A kickbox.io email lookup validator for form requests in laravel. This custom validator for Laravel uses the kickbox.io API to validate that an email actual exists. Not just if it has a specific format or not, but if the email is a real email registered email.
For a working example check out Laravel Validator Example project.
Also see: Laravel Twilio Validator for phone number validation.
Step 1
Install via composer:
composer require stuyam/laravel-kickbox-validator
Step 2
Add to your config/app.php service provider list:
StuYam\KickboxValidator\KickboxValidatorServiceProvider::class
Step 3
Add Kickbox credentials to your .env file:
KICKBOX_API_KEY=xxxxxxxxxx
Step 4 (optional)
Publish the kickbox config with php artisan vendor:publish --tag=kickbox
Usage
Add the string 'kickbox' to a form request rules or validator like so:
<?php namespace App\Http\Requests; use App\Http\Requests\Request; class EmailFormRequest extends Request { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'email' => 'required|kickbox' ]; } }
统计信息
- 总下载量: 10.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-29