Download the PHP package coolrist/role-based-email-validator without Composer
On this page you can find all versions of the php package coolrist/role-based-email-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coolrist/role-based-email-validator
More information about coolrist/role-based-email-validator
Files in coolrist/role-based-email-validator
Package role-based-email-validator
Short Description Laravel custom rule to detect role-based emails.
License MIT
Informations about the package role-based-email-validator
Documentation: Coolrist/RoleBasedEmailValidator Package
The Coolrist/RoleBasedEmailValidator package is a Laravel extension that adds a custom validation rule to block role-based email addresses like admin@, info@, support@, etc. It ensures users register with personal email addresses, improving the reliability of your user data and the effectiveness of your communication.
1. Why Use This Package?
In many applications, it's important to make sure each user is uniquely identifiable. This package helps you:
- โ Improve user data quality โ no more generic emails in your database.
- ๐ซ Reduce spam and abuse โ role-based addresses are commonly used for testing or fraudulent signups.
- ๐ฌ Enable targeted communication โ youโre messaging a real person, not a shared inbox.
2. Installation
Install it via Composer:
Then, publish the configuration file (optional but recommended):
This creates a config/role_based.php file where you can tweak settings to fit your use case.
3. Configuration
Hereโs what the config file looks like:
only_custom => false: combines the internal list (included in the package) with your custom list. Best for full protection.only_custom => true: disables the internal list and uses only your custom entries.
The internal list already includes common role-based prefixes like admin, support, info, sales, and more.
4. Usage
Once installed and configured, you can use the not_role_based rule in your Laravel validators:
If a user tries to register with something like [email protected], validation will fail and return:
"The email address is role-based."
๐ก This message is customizable in your Laravel language files.
5. Bonus: Rock-Solid Email Validation ๐ก๏ธ
For even stronger email checks, combine this package with Propaganistas/Laravel-Disposable-Email, which blocks temporary email addresses.
Install it:
Then chain the rules like so:
๐ฅ With this combo, you ensure the email is technically valid, not disposable, and not role-based. Only solid, permanent, personal emails get through.
6. Want to Help Us Push This Like a TUF Laptop with an RTX? ๐๐ฎ
If you want to support the project โ with some code, some cash, or just good vibes โ reach out! The maintainer's email is in the composer.json file, like a hidden bonus in a well-coded level. ๐
We love stylish commits, fresh ideas, and even dream-desk setup gifs (especially with RGB lighting). Thanks for being here โ whether you're a dev, supporter, or just a curious visitor stopping by with good energy. ๐ป๐ฅ