Download the PHP package eg-mohamed/email-validation without Composer
On this page you can find all versions of the php package eg-mohamed/email-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eg-mohamed/email-validation
More information about eg-mohamed/email-validation
Files in eg-mohamed/email-validation
Package email-validation
Short Description A comprehensive Laravel package for advanced email validation combining RFC compliance checks, DNS/MX record verification, and disposable email detection.
License MIT
Homepage https://github.com/eg-mohamed/email-validation
Informations about the package email-validation
Email Validation for Laravel
A comprehensive Laravel package for advanced email validation combining RFC compliance checks, DNS/MX record verification, and disposable email detection. Built on top of egulias/email-validator and propaganistas/laravel-disposable-email.
Features
- RFC Syntax Validation: Validates email format against RFC 5321, 5322, 6530, 6531, 6532, and 1035
- DNS/MX Record Verification: Checks if the email domain has valid MX records
- Disposable Email Detection: Blocks temporary/disposable email providers
- Configurable Validations: Enable/disable specific validation checks via config
- Custom Error Messages: Customize validation error messages
- Facade Support: Easy access via Laravel facade
Installation
You can install the package via composer:
Optionally, you can publish the config file with:
This is the contents of the published config file:
You can also publish the translations:
The package includes English and Arabic translations by default.
Usage
Using the Validation Rule
You can use the email_validation rule in your validation rules:
Using the Rule Class
You can also use the rule class directly:
Using the Facade
The package provides a facade for programmatic validation:
Configuration
You can control which validations are performed by modifying the config file:
Custom Error Messages
Customize the error messages by publishing and editing the translation files:
English (lang/en/email-validation.php):
Arabic (lang/ar/email-validation.php):
Validation Order
Validations are performed in the following order for optimal performance:
- Syntax validation (fastest)
- Disposable email check (medium)
- DNS/MX verification (slowest)
The validation stops at the first failure to minimize processing time.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Mohamed Said
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of email-validation with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0|^11.0|^12.0
egulias/email-validator Version ^4.0
propaganistas/laravel-disposable-email Version ^2.0