Download the PHP package cerbero/command-validator without Composer
On this page you can find all versions of the php package cerbero/command-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cerbero/command-validator
More information about cerbero/command-validator
Files in cerbero/command-validator
Package command-validator
Short Description Laravel package to validate the input of console commands.
License MIT
Homepage https://github.com/cerbero90/command-validator
Informations about the package command-validator
โ Command Validator
Laravel package to validate the input of console commands.
๐ฆ Install
Via Composer:
๐ฎ Usage
To validate the input of our console commands, we can use the ValidatesInput
trait and define the validation rules for our arguments and options in the rules()
method:
The available rules are the same validation rules provided by Laravel. If we need custom validation, here is how we can define custom rules in Laravel.
Sometimes we may need to show custom messages or attributes for some validation errors. We can achieve that by overriding the methods messages()
and attributes()
:
๐ Change log
Please see CHANGELOG for more information on what has changed recently.
๐งช Testing
๐ Contributing
Please see CODE_OF_CONDUCT for details.
๐งฏ Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
๐ Credits
- Andrea Marco Sartori
- All Contributors
โ๏ธ License
The MIT License (MIT). Please see License File for more information.