<?php

namespace Modules\MembershipApplication\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    /**
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'proposer_id' => 'nullable|uuid|exists:users,id',
            'supporter_id' => 'nullable|uuid|exists:users,id',
        ];
    }

    /**
     * @return array<string, string>
     */
    public function messages(): array
    {
        return [
            'proposer_id.exists' => 'Pencadang tidak dijumpai.',
            'supporter_id.exists' => 'Penyokong tidak dijumpai.',
        ];
    }
}
