Skip to content

Commit

Permalink
字段过滤
Browse files Browse the repository at this point in the history
使用模型验证来过滤字段
  • Loading branch information
tanteng authored Aug 3, 2016
1 parent 33a38a2 commit 264ae88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function rules()
[['name', 'repo_password'], 'string', 'max' => 100],
[['version'], 'string', 'max' => 20],
['repo_type', 'default', 'value' => self::REPO_GIT],
[['repo_url', 'deploy_from'], 'filter', 'filter' => function ($value) {
[['repo_url', 'deploy_from', 'release_to', 'release_library'], 'filter', 'filter' => function ($value) {
return rtrim($value, '/');
}],
[['deploy_from', 'release_to', 'release_library', 'repo_url'], 'string', 'max' => 200],
Expand Down

0 comments on commit 264ae88

Please sign in to comment.