<?php

namespace Modules\MembershipApplication\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class GenerateResultLetterRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    /**
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'board_meeting_reference' => 'required|string|max:255',
            'board_meeting_date' => 'required|date',
        ];
    }

    /**
     * @return array<string, string>
     */
    public function messages(): array
    {
        return [
            'board_meeting_reference.required' => 'Rujukan mesyuarat lembaga diperlukan.',
            'board_meeting_reference.max' => 'Rujukan mesyuarat lembaga tidak boleh melebihi 255 aksara.',
            'board_meeting_date.required' => 'Tarikh mesyuarat lembaga diperlukan.',
            'board_meeting_date.date' => 'Tarikh mesyuarat lembaga tidak sah.',
        ];
    }
}
