fix: 文章验证

This commit is contained in:
2025-07-11 17:50:53 +08:00
parent 9c6e26ce05
commit d4be3ff937

View File

@@ -23,9 +23,9 @@ class ArticleValidate extends Validate
'sort' => 'integer',
'recommend' => 'require|in:0,1',
'release_time' => 'dateFormat:Y-m-d H:i:s',
'seo_title' => 'max:255',
'seo_keywords' => 'max:255',
'seo_desc' => 'max:255'
'seo_title' => 'max:512',
'seo_keywords' => 'max:512',
'seo_desc' => 'max:1024'
];
/**
@@ -48,8 +48,8 @@ class ArticleValidate extends Validate
'recommend.require' => '推荐状态不能为空',
'recommend.in' => '推荐状态的值必须是0或1',
'release_time.dateFormat' => '发布时间格式不正确',
'seo_title.max' => 'SEO标题长度不能超过255个字符',
'seo_keywords.max' => 'SEO关键字长度不能超过255个字符',
'seo_desc.max' => 'SEO描述长度不能超过255个字符'
'seo_title.max' => 'SEO标题长度不能超过512个字符',
'seo_keywords.max' => 'SEO关键字长度不能超过512个字符',
'seo_desc.max' => 'SEO描述长度不能超过1024个字符'
];
}