<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class MealImageAnalysisRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'image' => ['required', 'image', 'max:4096'],
        ];
    }

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

    public function messages(): array
    {
        return [
            'image.required' => __('api.validation.image_required'),
            'image.image' => __('api.validation.image_file'),
            'image.max' => __('api.validation.image_max_4mb'),
        ];
    }
}
