updated bukti validation

This commit is contained in:
Jagad R R
2025-01-02 18:50:24 +07:00
parent 8e08f3eda7
commit 4b714d340b
5 changed files with 30 additions and 30 deletions
@@ -84,9 +84,9 @@ class FormVehicleController extends Controller
'tipe_bensin' => 'required|in:pertalite,pertamax',
'nopol' => 'required',
'keterangan' => 'required',
'bukti1' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,heic,heif|max:51200',
'bukti2' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti3' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti1' => ['nullable', 'file', 'max:51200', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti2' => ['nullable', 'file', 'max:51200', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti3' => ['nullable', 'file', 'max:51200', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
]);
$cabang = UserHasCabang::with('cabang')->where('user_id', auth()->user()->id)->first()->cabang;
@@ -189,9 +189,9 @@ class FormVehicleController extends Controller
'tipe_bensin' => 'required|in:pertalite,pertamax',
'nopol' => 'required',
'keterangan' => 'required',
'bukti1' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,heic,heif|max:51200',
'bukti2' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti3' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti1' => ['nullable', 'file', 'max:51200', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti2' => ['nullable', 'file', 'max:51200', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti3' => ['nullable', 'file', 'max:51200', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
]);
$form = FormVehicleRunningCost::findOrfail($id);