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.

48 lines
1.4 KiB

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