- Notifications
You must be signed in to change notification settings - Fork2
EVA - Email Validator Laravel Plugin!
License
square-bit/eva-laravel
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Laravel package for integration with e-va.io service.Provides a Rule to automatically validate form emails.
composer require square-bit/laravel-eva
The package will automatically register its service provider.
To publish the default config atconfig/eva.php
:
php artisan vendor:publish --provider="Squarebit\EVA\EVAServiceProvider" --tag="config"
Make sure you update the.env
file with a valid API Key (generate one at e-va.io)
Variables | Default value |
---|---|
EVA_APIKEY | null |
EVA_SERVICE_UNAVAILABLE | true |
EVA_UNKOWN | false |
EVA_INVALID | false |
EVA_RISKY | false |
EVA_SAFE | true |
You can now use EVA to validate any email provided by your users directly with the Laravel Validator.
Let's say you're already validating an email on its basic properties
return Validator::make($data, [ [...]'email' => ['required','string','email','max:255'], [...] ]);
To get the email validated simply add the EVAValidated class to the list of rules:
useSquarebit\EVA\Rules\EVAValidated[...]return Validator::make($data, [ [...]'email' => [newEVAValidated,'required','string','email','max:255','unique:users'], [...] ]);
That's it !
If you discover any security related issues, please emailinfo@square-bit.com instead of using the issue tracker.
MIT. Please see thelicense file for more information.
About
EVA - Email Validator Laravel Plugin!