Skip to content

Commit

Permalink
缺少参数时,添加desc到翻译
Browse files Browse the repository at this point in the history
  • Loading branch information
dogstarTest committed Dec 28, 2019
1 parent 10f7916 commit 189bab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function getByRule($rule) {
// 支持自定义友好的错误提示信息,并支持i18n国际翻译
$message = isset($rule['message'])
? T($rule['message'])
: T('{name} require, but miss', array('name' => $rule['name']));
: T('{name} require, but miss', array('name' => $rule['name'], 'desc' => isset($rule['desc']) ? $rule['desc'] : ''));
throw new BadRequestException($message);
}

Expand Down

0 comments on commit 189bab5

Please sign in to comment.