# Command Validation
[![Latest Stable Version](https://poser.pugx.org/friendsofhyperf/command-validation/version.png)](https://packagist.org/packages/friendsofhyperf/command-validation)
[![Total Downloads](https://poser.pugx.org/friendsofhyperf/command-validation/d/total.png)](https://packagist.org/packages/friendsofhyperf/command-validation)
[![GitHub license](https://img.shields.io/github/license/friendsofhyperf/command-validation)](https://github.com/friendsofhyperf/command-validation)
The command validation component for Hyperf.
## Installation
```shell
composer require friendsofhyperf/command-validation
```
## Usage
```php
info(sprintf('Hello %s.', $this->input->getArgument('name')));
}
public function rules(): array
{
return [
'name' => 'required',
];
}
protected function messages(): array
{
return [
'name.required' => 'The name is required.',
];
}
}
```
## Donate
> If you like them, Buy me a cup of coffee.
| Alipay | WeChat |
| ---- | ---- |
| | |
## Contact
- [Twitter](https://twitter.com/huangdijia)
- [Gmail](mailto:huangdijia@gmail.com)
## License
[MIT](LICENSE)