|
...
|
...
|
@@ -38,13 +38,7 @@ class ProductRequest extends FormRequest |
|
|
|
return [
|
|
|
|
'title' => 'required|max:200',
|
|
|
|
'route' => 'required|max:200',
|
|
|
|
'gallery' => ['required', 'array', function ($attribute, $value, $fail) {
|
|
|
|
foreach ($value as $v) {
|
|
|
|
if (empty($v['url'])) {
|
|
|
|
$fail('图片链接不能为空');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
'gallery' => ['required', 'array'],
|
|
|
|
'icon' => 'required|array',
|
|
|
|
'attrs' => ['array', function ($attribute, $value, $fail) {
|
|
|
|
foreach ($value as $v) {
|
...
|
...
|
|