Excited to share my first Laravel package - SafeName!
As a Laravel dev, I've often needed to prevent users from registering with reserved usernames like "admin" or "moderator". On platforms like this one, this is crucial to avoid impersonation and maintain trust.
SafeName makes this easy by providing both exact matching ("admin") and partial matching (blocking "admin123", "superadmin", etc.). I've included a curated list of commonly abused terms, but you can easily customize it for your needs.
Check it out on Packagist:
packagist.org/packages/quebecstudio/safename
Let me know what you think! Always open to feedback and contributions 🙌
(Yes, I developed this with in mind exactly the observations we made today...)
Back
•
Haha, yes! I hesitated to provide all the gods' names, but I finally decided to leave it up to the users to configure it as they prefer.
I recently had to compile a collection of certain reserved terms (profanity, short, brands, etc.). It is very expandable, but it is a good start. It can serve as supplementary material.
github.com/jaltez/reserved-words
•
This is a very good compilation! Though, my package is mostly intended for filtering-out misleading usernames, of course it can be a good idea to implement profanity and brandnames protection as other validation rules. I will think about this :-)