update max size photo validation
This commit is contained in:
parent
2b37be5f51
commit
2996f49f26
|
|
@ -37,7 +37,7 @@ public function store(Request $request)
|
||||||
'numeric' => ':attribute harus berupa angka.',
|
'numeric' => ':attribute harus berupa angka.',
|
||||||
'image' => ':attribute harus berupa file gambar (foto).',
|
'image' => ':attribute harus berupa file gambar (foto).',
|
||||||
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
||||||
'max.file' => 'Ukuran :attribute terlalu besar, maksimal adalah 2MB.',
|
'foto.max' => 'Ukuran :attribute terlalu besar, maksimal adalah 2MB.',
|
||||||
], [
|
], [
|
||||||
// Alias Atribut agar pesan lebih ramah pengguna
|
// Alias Atribut agar pesan lebih ramah pengguna
|
||||||
'nama' => 'nama buket',
|
'nama' => 'nama buket',
|
||||||
|
|
@ -97,7 +97,7 @@ public function update(Request $request, string $id)
|
||||||
'numeric' => ':attribute harus berupa angka.',
|
'numeric' => ':attribute harus berupa angka.',
|
||||||
'image' => ':attribute harus berupa file gambar (foto).',
|
'image' => ':attribute harus berupa file gambar (foto).',
|
||||||
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
||||||
'max.file' => 'Ukuran :attribute terlalu besar, maksimal adalah 2MB.',
|
'foto.max' => 'Ukuran :attribute terlalu besar, maksimal adalah 2MB.',
|
||||||
], [
|
], [
|
||||||
// Alias Atribut agar pesan lebih ramah pengguna
|
// Alias Atribut agar pesan lebih ramah pengguna
|
||||||
'nama' => 'nama buket',
|
'nama' => 'nama buket',
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public function store(Request $request)
|
||||||
'max' => ':attribute melebihi batas, maksimal :max karakter/KB.',
|
'max' => ':attribute melebihi batas, maksimal :max karakter/KB.',
|
||||||
'image' => ':attribute harus berupa file gambar (foto).',
|
'image' => ':attribute harus berupa file gambar (foto).',
|
||||||
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
||||||
'max.file' => 'Ukuran :attribute maksimal 2MB.',
|
'foto.max' => 'Ukuran :attribute maksimal 2MB.',
|
||||||
'min' => ':attribute minimal harus :min karakter/nilai.',
|
'min' => ':attribute minimal harus :min karakter/nilai.',
|
||||||
'numeric' => ':attribute harus berupa angka.',
|
'numeric' => ':attribute harus berupa angka.',
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ public function store(Request $request)
|
||||||
// ]);
|
// ]);
|
||||||
|
|
||||||
// return redirect()->back()->with('success', 'Paket foto baru berhasil ditambahkan!');
|
// return redirect()->back()->with('success', 'Paket foto baru berhasil ditambahkan!');
|
||||||
|
|
||||||
if (!$request->hasFile('foto')) {
|
if (!$request->hasFile('foto')) {
|
||||||
return redirect()->back()
|
return redirect()->back()
|
||||||
->with('error', 'File foto tidak ditemukan!')
|
->with('error', 'File foto tidak ditemukan!')
|
||||||
|
|
@ -117,7 +117,7 @@ public function update(Request $request, string $id)
|
||||||
'max' => ':attribute melebihi batas, maksimal :max karakter/KB.',
|
'max' => ':attribute melebihi batas, maksimal :max karakter/KB.',
|
||||||
'image' => ':attribute harus berupa file gambar (foto).',
|
'image' => ':attribute harus berupa file gambar (foto).',
|
||||||
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
'mimes' => 'Format :attribute tidak didukung. Gunakan format: jpeg, png, atau jpg.',
|
||||||
'max.file' => 'Ukuran :attribute maksimal 2MB.',
|
'foto.max' => 'Ukuran :attribute maksimal 2MB.',
|
||||||
'min' => ':attribute minimal harus :min karakter/nilai.',
|
'min' => ':attribute minimal harus :min karakter/nilai.',
|
||||||
'numeric' => ':attribute harus berupa angka.',
|
'numeric' => ':attribute harus berupa angka.',
|
||||||
], [
|
], [
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ public function store(Request $request)
|
||||||
'after_or_equal' => ':attribute tidak boleh tanggal yang sudah lewat.',
|
'after_or_equal' => ':attribute tidak boleh tanggal yang sudah lewat.',
|
||||||
'image' => ':attribute harus berupa file gambar.',
|
'image' => ':attribute harus berupa file gambar.',
|
||||||
'mimes' => 'Format :attribute harus jpeg, png, atau jpg.',
|
'mimes' => 'Format :attribute harus jpeg, png, atau jpg.',
|
||||||
'max.file' => 'Ukuran :attribute maksimal adalah 2MB.',
|
'bukti_bayar.max' => 'Ukuran :attribute maksimal adalah 2MB.',
|
||||||
], [
|
], [
|
||||||
'nama' => 'nama pemesan',
|
'nama' => 'nama pemesan',
|
||||||
'no_wa' => 'nomor WhatsApp',
|
'no_wa' => 'nomor WhatsApp',
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ public function store(Request $request)
|
||||||
'after_or_equal' => ':attribute tidak boleh tanggal yang sudah lewat.',
|
'after_or_equal' => ':attribute tidak boleh tanggal yang sudah lewat.',
|
||||||
'image' => ':attribute harus berupa file gambar.',
|
'image' => ':attribute harus berupa file gambar.',
|
||||||
'mimes' => 'Format :attribute harus jpeg, png, atau jpg.',
|
'mimes' => 'Format :attribute harus jpeg, png, atau jpg.',
|
||||||
'max.file' => 'Ukuran :attribute maksimal adalah 2MB.',
|
'bukti_bayar.max' => 'Ukuran :attribute maksimal adalah 2MB.',
|
||||||
'waktu_ambil.after_or_equal' => 'Jam operasional kami mulai pukul 09:00.',
|
'waktu_ambil.after_or_equal' => 'Jam operasional kami mulai pukul 09:00.',
|
||||||
'waktu_ambil.before_or_equal' => 'Jam operasional kami berakhir pukul 21:00.',
|
'waktu_ambil.before_or_equal' => 'Jam operasional kami berakhir pukul 21:00.',
|
||||||
], [
|
], [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue