Download the PHP package empinet/laravel-email-validation without Composer
On this page you can find all versions of the php package empinet/laravel-email-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download empinet/laravel-email-validation
More information about empinet/laravel-email-validation
Files in empinet/laravel-email-validation
Package laravel-email-validation
Short Description Laravel validation rule for EasyEmailAPI
License MIT
Informations about the package laravel-email-validation
EasyEmailAPI Laravel Validation Rule
Strict email validation for Laravel using EasyEmailAPI.
This package provides a Laravel validation rule that helps detect invalid, disposable, role-based, and risky email addresses before they enter your system. It is designed for sign-up forms, user registration flows, and any place where email quality and deliverability matter.
Installation
Publish the config file:
Getting an API token
To use this package, you need an API token from EasyEmailAPI. You can create a free account and get your token at https://easyemailapi.com
EasyEmailAPI offers a free tier, which is usually enough for testing, small projects, and personal applications.
Set your token in .env:
Usage
Override defaults per rule instance:
Configuration
The configuration file is located at config/easyemailapi.php. It controls authentication,
validation behavior, caching, and fallback handling.
Key settings:
token: API token (fromEASYEMAILAPI_TOKEN).auth_mode:bearer(default) orquery.timeout: Request timeout in seconds.retries: Number of retries when a request fails.cache.enabled: Enable response caching.cache.store: Cache store to use (optional).cache.ttl: Cache TTL in seconds (default 24 hours).validation.*: Defaults for response evaluation.fallback.behavior:basic_email(default),pass,fail, orexception.fallback.log: Enable logging when fallback triggers (defaulttrue).fallback.log_level: Log severity for fallback (defaulterror).messages.*: Customize the validation error text returned to users.
Response Evaluation Defaults
The default behavior matches the recommended EasyEmailAPI settings:
require_mx= truedisallow_disposable= truedisallow_free= falsedisallow_role= falserequire_inbox_exists= falsemin_score= 0
These defaults provide strong protection against disposable and invalid email addresses without being overly aggressive.
Caching
Validation responses are cached per email address and rule options. This prevents repeat calls to the EasyEmailAPI service for the same email and improves performance for high-traffic forms and registration endpoints.
Fallback Behavior
When the EasyEmailAPI service is unavailable, the rule will apply the configured fallback strategy:
basic_email: fall back to Laravel's built-inemailrule.pass: allow validation to pass.fail: fail validation.exception: throwEasyEmailApiException.
This allows you to balance strict validation against availability requirements.
Testing
About EasyEmailAPI
This package is powered by EasyEmailAPI, a real-time email validation service built to help developers prevent fake sign-ups, disposable email abuse, and invalid addresses before they reach the database. EasyEmailAPI goes beyond basic syntax checks by validating MX records, detecting temporary and disposable email providers, and assessing overall email risk, making it ideal for modern applications that care about data quality, deliverability, and protecting registration flows from spam and automated abuse.
All versions of laravel-email-validation with dependencies
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/validation Version ^10.0|^11.0|^12.0|^13.0