<?php

namespace App\Http\Requests\V3\RoadObservation;

use Illuminate\Foundation\Http\FormRequest;

class ModifyRegisterationRequest 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 [
            'rms_status' => 'required|in:1,2',
            'rms_description' => 'required_if:rms_status,1|string',
            'image_before' => 'file|mimes:jpg,jpeg,png',
            'image_after' => 'file|mimes:jpg,jpeg,png',
            'start_point' => 'string',
        ];
    }
}
