liberty_code_module/validation
最新稳定版本:v1.0.0
Composer 安装命令:
composer require liberty_code_module/validation
包简介
Module
README 文档
README
Description
Library contains framework modules, to manage application validation.
Requirement
- Script language: PHP: version 7 || 8
Installation
Several ways are possible:
Composer
Requirement
It requires composer installation. For more information: https://getcomposer.org
Command: Move in project root path
cd "<project_root_path>"Command: Installation
php composer.phar require liberty_code_module/validation ["<version>"]Note
Include vendor
If project uses composer, vendor must be included:
require_once('<project_root_path>/vendor/autoload.php');Configuration
Installation command allows to add, on composer file "/composer.json", following configuration:
{ "require": { "liberty_code_module/validation": "<version>" } }
Include
Download
- Download following repository.
- Put it on repository root path.
Include source
require_once('<repository_root_path>/include/Include.php');
Application installation
Configuration
Configuration: application module: "/config/Module."
Add in list part, required modules:
Example for YML configuration format, from composer installation:
list: [ { path: "/vendor/liberty_code_module/validation/src/validation", config_parser: { type: "string_table_php", source_format_get_regexp: "#^\\<\\?php\\s*(.*)(\\s\\?\\>)?\\s*$#ms", source_format_set_pattern: "<?php \\n%1$s", cache_parser_require: true, cache_file_parser_require: true } }, { path: "/vendor/liberty_code_module/validation/src/rule", config_parser: { type: "string_table_php", source_format_get_regexp: "#^\\<\\?php\\s*(.*)(\\s\\?\\>)?\\s*$#ms", source_format_set_pattern: "<?php \\n%1$s", cache_parser_require: true, cache_file_parser_require: true } }, { path: "/vendor/liberty_code_module/validation/src/cache", config_parser: { type: "string_table_php", source_format_get_regexp: "#^\\<\\?php\\s*(.*)(\\s\\?\\>)?\\s*$#ms", source_format_set_pattern: "<?php \\n%1$s", cache_parser_require: true, cache_file_parser_require: true } } ]
Configuration
Application parameters configuration
Use following file on your modules to configure specific elements
<module_root_path>/config/ParamApp.phpElements configurables
Configuration to param validator.
Configuration to param cache.
Usage
Following examples consider command line application relative path as "bin/app".
Validation
Features allow to set and manage validation, available in application.
Example
cd "<project_root_path>"
...
// Get all rule names
php bin/app validation:rule:get:rule-name
rule
Features allow to set and manage rules, available for application validation.
Cache
Features allow to set and manage cache, available for application validation.
统计信息
- 总下载量: 346
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-10-09