Siopas Inventory PETI for ISTW Website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ValidasiUpdatePengembalian extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'peti_id' => 'required',
'exit_at' => 'required|date',
'est_pengembalian' => 'required|date',
'exit_warehouse' => 'required',
'enter_at' => 'required|date',
'enter_warehouse' => 'required',
'kondisi_peti' => 'required|string',
'status' => '',
];
}
public function messages()
{
return [
'peti_id.required' => 'Kolom peti_id wajib diisi.',
'exit_at.required' => 'Kolom exit_at wajib diisi.',
'exit_at.date' => 'Kolom exit_at harus berupa tanggal.',
'est_pengembalian.required' => 'Kolom est_pengembalian wajib diisi.',
'est_pengembalian.date' => 'Kolom est_pengembalian harus berupa tanggal.',
'exit_warehouse.required' => 'Kolom exit_warehouse wajib diisi.',
'enter_at.required' => 'Kolom enter_at wajib diisi.',
'enter_at.date' => 'Kolom enter_at harus berupa tanggal.',
'enter_warehouse.required' => 'Kolom enter_warehouse wajib diisi.',
'kondisi_peti.required' => 'Kolom kondisi_peti wajib diisi.',
'kondisi_peti.string' => 'Kolom kondisi_peti harus berupa teks.',
];
}
}