<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class MealPostCalendarRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'month' => ['sometimes', 'date_format:Y-m'],
        ];
    }

    public function authorize(): bool
    {
        return true;
    }

    public function messages(): array
    {
        return [
            'month.date_format' => __('api.validation.month_valid'),
        ];
    }
}
