Symfony Validator for Reserved Usernames
![Software License][ico-license]
![Coverage Status][ico-scrutinizer]
![Total Downloads][ico-downloads], (*1)
Symfony validator for reserved usernames (or strings), based on shouldbee/reserved-usernames., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require emanueleminotto/reserved-usernames-validator, (*4)
## Usage
``` php
use EmanueleMinotto\ReservedUsernamesValidator\NotReserved;
$constraint = new NotReserved();
$constraint->message = 'The username "%value%" is reserved.';
// use the validator to validate the value
$errorList = $this
->get('validator')
->validate('about', $constraint);
$errorMessage = $errorList[0]->getMessage(); // The username "about" is reserved.
Change log
Please see CHANGELOG for more information on what has changed recently., (*5)
Testing
bash
$ composer test, (*6)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*7)
Security
If you discover any security related issues, please email minottoemanuele@gmail.com instead of using the issue tracker., (*8)
Credits
License
The MIT License (MIT). Please see License File for more information., (*9)