laravel-neverbounce
Validate an email address against the NeverBounce API.
Installation
composer require moonbaselabs/laravel-neverbounce
Add API key to configs/services.php
(See Obtaining an API Key below):
'neverbounce' => [
'api_key' => env('NEVERBOUNCE_API_KEY'),
],
Add translation to resources/lang/en/validation.php
'neverbounce' => 'The :attribute is not valid. :suggestion :error',
Obtaining an API key
- Register for a Neverbounce Account.
- Create a new App.
- Copy secret API Key. (Note: Make sure it is a v4 api key. It will start with
private_***
).
Usage
$emailInput = $request->validate([
'email' => 'required|email|neverbounce',
]);