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.
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Disposal;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
class ValidasiUpdateDisposal 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',
|
|
|
|
'customer_id' => 'nullable',
|
|
|
|
'warehouse_id' => 'nullable',
|
|
|
|
'date_disposal' => 'nullable|date',
|
|
|
|
'description' => 'nullable|string',
|
|
|
|
'status_disposal' => 'nullable',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function messages(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'date_disposal.date' => 'Format tanggal disposal tidak valid.',
|
|
|
|
'description.string' => 'Deskripsi harus berupa teks.',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|