<?php

namespace App\Http\Requests\V1\BadDebt;

use Illuminate\Foundation\Http\FormRequest;

class StoreBadDebtMemoRequest 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 [
            'content' => ['required', 'string', 'max:5000'],
        ];
    }

    /**
     * Get custom messages for validator errors.
     *
     * @return array<string, string>
     */
    public function messages(): array
    {
        return [
            'content.required' => __('validation.required', ['attribute' => '메모 내용']),
            'content.max' => __('validation.max.string', ['attribute' => '메모 내용', 'max' => 5000]),
        ];
    }
}
