<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class LeasingRecordRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'nopol' => 'required|string|max:20',
            'chassis_number' => 'required|string|max:50',
            'engine_number' => 'required|string|max:50',
            'description' => 'nullable|string',
            'internal_note' => 'nullable|string',
        ];
    }

    public function messages(): array
    {
        return [
            'nopol.required' => 'Nomor Polisi wajib diisi.',
            'chassis_number.required' => 'Nomor Rangka wajib diisi.',
            'engine_number.required' => 'Nomor Mesin wajib diisi.',
        ];
    }
}
