<?php

namespace App\Http\Requests\Trade\NocForMandap;

use Illuminate\Support\Facades\Auth;
use Illuminate\Foundation\Http\FormRequest;

class UpdateRequest 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
    {
         if (Auth::user()->hasRole('Clerk')){
            return [
            'agnishamak_javak_kramank' => 'required',
            'agnishamak_police_date' => 'required',
            'stanikpolice_javak_kramank' => 'required',
            'stanikpolice_date' => 'required',
            'sambandhit_javak_kramank' => 'required',
            'sambandhit_date' => 'required'
        ];
         }

    }

    public function messages()
    {
        return [
            // 'is_correct_info.required' => 'Please Accept Declaration'
        ];
    }
}
