|
...
|
...
|
@@ -38,8 +38,7 @@ class ProductRequest extends FormRequest |
|
|
|
return [
|
|
|
|
'title' => 'required|max:200',
|
|
|
|
'route' => 'required|max:200',
|
|
|
|
'seo_mate.title' => 'max:70',
|
|
|
|
'seo_mate.keyword' => 'max:200',
|
|
|
|
'seo_mate.keywords' => 'max:300',
|
|
|
|
'seo_mate.description' => 'max:200',
|
|
|
|
'status' => ['required', Rule::in(array_keys(Product::statusMap()))],
|
|
|
|
];
|
|
...
|
...
|
@@ -55,8 +54,7 @@ class ProductRequest extends FormRequest |
|
|
|
'status.required' => '请选择产品状态',
|
|
|
|
'status.in' => '产品状态值异常',
|
|
|
|
// 可选的 seo_mate 子字段的提示
|
|
|
|
'seo_mate.title.max' => 'SEO 标题不能超过70个字符',
|
|
|
|
'seo_mate.keyword.max' => 'SEO 关键字不能超过200个字符',
|
|
|
|
'seo_mate.keywords.max' => 'SEO 关键字不能超过200个字符',
|
|
|
|
'seo_mate.description.max' => 'SEO 描述不能超过200个字符',
|
|
|
|
];
|
|
|
|
}
|
...
|
...
|
|