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.
55 lines
2.0 KiB
55 lines
2.0 KiB
1 year ago
|
<?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|integer',
|
||
|
'exit_at' => 'required|date',
|
||
|
'est_pengembalian' => 'required|date',
|
||
|
'exit_warehouse' => 'required|integer',
|
||
|
'enter_at' => 'required|date',
|
||
|
'enter_warehouse' => 'required|integer',
|
||
|
'kondisi_peti' => 'required|string',
|
||
|
];
|
||
|
}
|
||
|
|
||
|
public function messages()
|
||
|
{
|
||
|
return [
|
||
|
'peti_id.required' => 'Kolom peti_id wajib diisi.',
|
||
|
'peti_id.integer' => 'Kolom peti_id harus berupa angka bulat.',
|
||
|
'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.',
|
||
|
'exit_warehouse.integer' => 'Kolom exit_warehouse harus berupa angka bulat.',
|
||
|
'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.',
|
||
|
'enter_warehouse.integer' => 'Kolom enter_warehouse harus berupa angka bulat.',
|
||
|
'kondisi_peti.required' => 'Kolom kondisi_peti wajib diisi.',
|
||
|
'kondisi_peti.string' => 'Kolom kondisi_peti harus berupa teks.',
|
||
|
];
|
||
|
}
|
||
|
}
|