This commit is contained in:
2026-07-28 15:11:30 +04:00
parent 50671884dd
commit c007a755fe
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ class SaveNewsRequest extends FormRequest
'body' => ['required', 'string', 'max:20000'],
'sort_order' => ['required', 'integer', 'min:0', 'max:9999'],
'is_published' => ['nullable', 'boolean'],
'image' => ['nullable', 'image', 'max:2048'],
'image' => ['nullable', 'image', 'max:10240'],
];
}
@@ -47,7 +47,7 @@ class SaveNewsRequest extends FormRequest
'sort_order.min' => 'Порядок вывода не может быть отрицательным.',
'sort_order.max' => 'Порядок вывода слишком большой.',
'image.image' => 'Файл должен быть изображением.',
'image.max' => 'Изображение не должно превышать 2 МБ.',
'image.max' => 'Изображение не должно превышать 10 МБ.',
];
}
}
@@ -78,7 +78,7 @@ function destroyItem() {
<label v-if="allowImage" class="admin-field admin-upload">
<span>{{ item ? 'Заменить картинку' : 'Картинка' }}</span>
<input type="file" accept="image/*" @input="form.image = $event.target.files[0]" />
<em>{{ item ? 'Оставь пустым, чтобы сохранить текущую.' : 'Максимум 2 МБ. Необязательно.' }}</em>
<em>{{ item ? 'Оставь пустым, чтобы сохранить текущую. Максимум 10 МБ.' : 'Максимум 10 МБ. Необязательно.' }}</em>
<small v-if="form.errors.image">{{ form.errors.image }}</small>
</label>