https://github.com/ctf0/emailvalidator
validation rule to validate email for Laravel
https://github.com/ctf0/emailvalidator
email laravel validation
Last synced: about 1 year ago
JSON representation
validation rule to validate email for Laravel
- Host: GitHub
- URL: https://github.com/ctf0/emailvalidator
- Owner: ctf0
- License: mit
- Created: 2017-03-01T22:11:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:15:21.000Z (over 3 years ago)
- Last Synced: 2025-05-05T08:18:59.175Z (about 1 year ago)
- Topics: email, laravel, validation
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 16
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
EmailValidator
- MailGunValidatorServiceProvider [Mailgun Api](http://documentation.mailgun.com/api-email-validation). "[No Longer Free](http://blog.mailgun.com/mailgun-rolls-out-changes-to-email-validation-api-including-new-pricing-model-and-features/)"
- EguliasValidatorServiceProvider [Egulias EmailValidator](https://github.com/egulias/EmailValidator).
- ValidatorPizzaServiceProvider [Validator.pizza](https://www.validator.pizza)
> also check https://github.com/mailcheck/mailcheck & for vue https://github.com/ctf0/mailcheck-vue
## Installation
- `composer require ctf0/email-validator`
- add the service provider to `config/app.php`
```php
'providers' => [
ctf0\EmailValidator\MailGunValidatorServiceProvider::class,
// ctf0\EmailValidator\EguliasValidatorServiceProvider::class,
// ctf0\EmailValidator\ValidatorPizzaServiceProvider::class,
]
```
## Usage
- add the rule to the validator
```php
'email' => 'required|email|isValid'
```
- add the translation keys
```php
'custom' => [
// ...
'email' => [
'isValid' => 'This :attribute is invalid',
],
],
```
### Security
If you discover any security-related issues, please email [ctf0-dev@protonmail.com](mailto:ctf0-dev@protonmail.com).