Skip to content
validation rule to validate email for Laravel
Branch: master
Clone or download
Latest commit 6af7143 Oct 19, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src style Oct 19, 2018
.gitignore
LICENSE
README.md style Oct 19, 2018
composer.json

README.md

EmailValidator
Latest Stable Version Total Downloads

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

    'providers' => [
        ctf0\EmailValidator\MailGunValidatorServiceProvider::class,
        // ctf0\EmailValidator\EguliasValidatorServiceProvider::class,
        // ctf0\EmailValidator\ValidatorPizzaServiceProvider::class,
    ]

Usage

  • add the rule to the validator

    'email' => 'required|email|isValid'
  • add the translation keys

    'custom' => [
        // ...
        'email' => [
            'isValid' => 'This :attribute is invalid',
        ],
    ],
You can’t perform that action at this time.