Package Data | |
---|---|
Maintainer Username: | stuyam |
Maintainer Contact: | stuartyamartino@gmail.com (Stuart Yamartino) |
Package Create Date: | 2016-06-29 |
Package Last Update: | 2019-09-12 |
Home Page: | https://packagist.org/packages/stuyam/laravel-kickbox-validator |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:16:34 |
Package Statistics | |
---|---|
Total Downloads: | 9,941 |
Monthly Downloads: | 9 |
Daily Downloads: | 2 |
Total Stars: | 4 |
Total Watchers: | 5 |
Total Forks: | 5 |
Total Open Issues: | 0 |
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.
Install via composer:
composer require stuyam/laravel-kickbox-validator
Add to your config/app.php
service provider list:
StuYam\KickboxValidator\KickboxValidatorServiceProvider::class
Add Kickbox credentials to your .env file:
KICKBOX_API_KEY=xxxxxxxxxx
Publish the kickbox config with php artisan vendor:publish --tag=kickbox
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'
];
}
}