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.

56 lines
2.0 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|integer',
'exit_at' => 'required|date',
'est_pengembalian' => 'required|date',
'enter_at' => 'required|date',
'enter_warehouse' => 'required|integer',
'kondisi_peti_id' => 'required|integer',
'customer_id' => 'required|integer',
'status' => '',
];
}
public function messages()
{
return [
'peti_id.required' => 'Kolom peti_id wajib diisi.',
'peti_id.integer' => 'Kolom peti_id harus berupa angka.',
'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.',
'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.',
'kondisi_peti_id.required' => 'Kolom kondisi_peti_id wajib diisi.',
'kondisi_peti_id.integer' => 'Kolom kondisi_peti_id harus berupa angka.',
'customer_id.required' => 'Kolom customer_id wajib diisi.',
'customer_id.integer' => 'Kolom customer_id harus berupa angka.',
];
}
}