Download the PHP package antriver/laravel-unique-email-validator without Composer
On this page you can find all versions of the php package antriver/laravel-unique-email-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download antriver/laravel-unique-email-validator
More information about antriver/laravel-unique-email-validator
Files in antriver/laravel-unique-email-validator
Package laravel-unique-email-validator
Short Description Laravel validation rule to check an email address is really unique.
License MIT
Informations about the package laravel-unique-email-validator
Laravel Unique Email Validator
This provides a Laravel validation rule that improves upon the built in 'unique' rule when preventing the same email address being used more than once.
Some email providers (Gmail) allow you to use + in the email address to create 'aliases'. For example if your email address is [email protected] you can also use:
and they all work. The normal 'unique' rule would allow these as they are all different. This rule sees these all as the same and will disallow using the same '[email protected]' account.
Some email providers (Gmail) also allow you to place periods anywhere before the @ sign in the email address and these will all work. For example if your email address is [email protected] you can also use:
Requirements
Your MySQL server must support the non-greedy regex operator. This has been tested with MySQL 8 and MariaDB 10.2 so those versions or newer should work.
Installation
composer require antriver/laravel-unique-email-validator
Usage
Like the original unique rule you can specify certain rows should be excluded. This is useful when updating a user and that should not reject the user's existing registered email address: