hamedmehryar / laravel-kickbox-validator-master by hamedmehryar

A kickbox email validator for form requests in laravel (forked from 'stayum')
59
1
2
Package Data
Maintainer Username: hamedmehryar
Maintainer Contact: hamed.cs@gmail.com (Hamed Mehryar)
Package Create Date: 2017-04-01
Package Last Update: 2017-04-01
Language: PHP
License: MIT
Last Refreshed: 2024-11-09 03:02:25
Package Statistics
Total Downloads: 59
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

#Lavarel Kickbox Validator

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.

Also see: Laravel Twilio Validator for phone number validation.

###Step 1 Install via composer:

composer require hamedmehryar/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

###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'
        ];
    }
}