2017 © Pedro Peláez
 

library laravel-email-domain-validation

PHP Laravel Email domain validator

image

madeitbelgium/laravel-email-domain-validation

PHP Laravel Email domain validator

  • Friday, June 29, 2018
  • by MadeITBelgium
  • Repository
  • 2 Watchers
  • 4 Stars
  • 346 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 21 % Grown

The README.md

PHP Laravel E-mail domain validator

Build Status Coverage Status Latest Stable Version Latest Unstable Version Total Downloads License, (*1)

With this Laravel package you can validate email input that it contains or not contains a specific domainname. This is useful to create a registration to restrict registrions for the company email domain., (*2)

Installation

Require this package., (*3)

composer require madeitbelgium/laravel-email-domain-validation

or add in your composer.json and update composer., (*4)

"madeitbelgium/laravel-email-domain-validation": "1.*"

After updating composer, add the ServiceProvider to the providers array in config/app.php, (*5)

MadeITBelgium\EmailDomainValidation\EmailDomainServiceProvider::class,

You can use the facade for shorter code. Add this to your aliases:, (*6)

'EmailDomainValidation' => MadeITBelgium\EmailDomainValidation\EmailDomainFacade::class,

Documentation

Usage

$emailDomain = new EmailDomain('info@madeit.be', ['madeit.be'], ['tpweb.org']);
$emailDomain->isEmailValid() //Checks if the given e-mail address is valid
$emailDomain->areAllowedDomainsValid(); //Check if the given allowed domains are valid
$emailDomain->areNotAllowedDomainsValid()


$emailDomain->isEmailAllowed() //Check if the email address is allowed.
$emailDomain->isEmailAllowed('info@madeit.be', ['madeit.be'], ['example.com']));

Laravel validator

public function store(Request $request) {
    $this->validate($request, ['email' => 'required|email|domain:madeit.be,hotmail.com|domainnot:gmail.com,yahoo.com']);
}

The complete documentation can be found at: http://www.madeit.be/, (*7)

Support

Support github or mail: tjebbe.lievens@madeit.be, (*8)

Contributing

Please try to follow the psr-2 coding style guide. http://www.php-fig.org/psr/psr-2/, (*9)

License

This package is licensed under LGPL. You are free to use it in personal and commercial projects. The code can be forked and modified, but the original copyright author should always be included!, (*10)

The Versions

29/06 2018

dev-master

9999999-dev http://www.madeit.be

PHP Laravel Email domain validator

  Sources   Download

LGPL LGPL-3.0-or-later

The Requires

 

The Development Requires

email domainname

29/06 2018
12/02 2018

1.0.1

1.0.1.0 http://www.madeit.be

PHP Laravel Email domain validator

  Sources   Download

LGPL-3.0-or-later

The Requires

 

The Development Requires

email domainname

19/06 2017

1.0.0.x-dev

1.0.0.9999999-dev http://www.madeit.be

PHP Laravel Email domain validator

  Sources   Download

LGPL

The Requires

 

The Development Requires

email domainname

19/06 2017

1.0.0

1.0.0.0 http://www.madeit.be

PHP Laravel Email domain validator

  Sources   Download

LGPL

The Requires

 

The Development Requires

email domainname