cyberfusion/validation-rules
最新稳定版本:v1.2.1
Composer 安装命令:
composer require cyberfusion/validation-rules
包简介
Library with general-purpose validation rules.
README 文档
README
Library with general-purpose validation rules.
Install
Composer
Run the following command to install the package from Packagist:
composer require cyberfusion/validation-rules
Usage
Rules
Cidr
Valid CIDR notation (e.g. 127.0.0.0/32).
use Cyberfusion\ValidationRules\Rules\Cidr; public function rules(): array { return [ 'field' => [new Cidr()], ]; }
CommonName
Valid common name (e.g. example.com or sub.example.com).
use Cyberfusion\ValidationRules\Rules\CommonName; public function rules(): array { return [ 'field' => [new CommonName()], ]; }
CronExpression
Valid cron expression (e.g. 0 0 1 1 *).
use Cyberfusion\ValidationRules\Rules\CronExpression; public function rules(): array { return [ 'field' => [new CronExpression()], ]; }
Translations
The package includes English and Dutch translations.
Publish them using the following command:
php artisan vendor:publish --provider="Cyberfusion\ValidationRules\ValidationRulesServiceProvider" --tag="translations"
统计信息
- 总下载量: 4.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-21