laasti/valitron-provider
最新稳定版本:v2.0.1
Composer 安装命令:
composer require laasti/valitron-provider
包简介
A league/container v2 service provider for vlucas/valitron.
README 文档
README
A league/container v2 service provider for vlucas/valitron.
Installation
composer require laasti/valitron-provider
Usage
$container = new League\Container\Container; $container->add('config', [ 'valitron' =>[ 'locale' => 'fr',//if not specified, attempts to use config.locale in the container, defaults to en, 'locales_dir' => __DIR__,//defaults, to Valitron's language files directory //Additional rules to add to Valitron, any php callbacks are accepted 'rules' => [ ['my_rule', 'my_callback', 'My message'] ] ] ]); $container->addServiceProvider('Laasti\ValitronProvider\ValitronProvider'); //The arguments are the same as Valitron's constructor $validator = $container->get('Valitron\Validator', [$data]);
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
History
See CHANGELOG.md for more information.
Credits
Author: Sonia Marquette (@nebulousGirl)
License
Released under the MIT License. See LICENSE.txt file.
统计信息
- 总下载量: 305
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-27