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.

42 lines
1.0 KiB

10 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',
10 months ago
'customer_id' => 'nullable',
'warehouse_id' => 'nullable',
'date_disposal' => 'nullable|date',
'description' => 'nullable|string',
'status_disposal' => 'nullable',
10 months ago
];
}
public function messages(): array
{
return [
'date_disposal.date' => 'Format tanggal disposal tidak valid.',
'description.string' => 'Deskripsi harus berupa teks.',
];
}
}