refactor: 修改额外配置项

This commit is contained in:
2025-04-27 11:15:02 +08:00
parent 9808b1ae25
commit 31744ee208
2 changed files with 7 additions and 7 deletions

View File

@@ -150,14 +150,14 @@ class SiteConfig
return error('参数错误');
}
$validate = validate([
$validate = \think\facade\Validate::rule([
'id' => 'require|integer',
'value' => 'max:512'
'value' => 'max:5120'
])
->message([
'id.require' => '配置项ID不能为空',
'id.integer' => '配置项ID必须是整数',
'value.max' => '配置值不能超过512个字符'
'value.max' => '配置值不能超过5120个字符'
]);
foreach ($put as $val) {
if (!$validate->check($val)) {