<?php

namespace App\Http\Requests\WaterDepartment\IllegalWaterConnection;

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
    {
        return [
            // 'complainants_full_name' => 'required',
            // 'aadhar_no' => 'required|min:12|max:12',
            // 'mobile_no' => 'required|min:10|max:10',
            // 'address' => 'required',
            // 'email_id' => 'required',
            // 'unauthorized_tap_connection' => 'required',
            // 'zone' => 'nullable',
            // 'ward_area' => 'nullable',
            // 'plot_no' => 'required',
            // 'house_no' => 'required',
            // 'landmark' => 'nullable',
            // 'unauthorized_connection_address' => 'required',
            // 'current_connection_is_authorized' => 'required',
            // 'applicant_or_tenant' => 'required',
            // 'unauthorized_is_tenant' => 'required',
            // 'criminal_judicial_issue' => 'required',
            // 'existing_connection_detail' => 'required',
            // 'place_belongs_to_municipal' => 'required',
            // 'comment' => 'nullable',
            // 'application_documents' => 'nullable|file|mimes:pdf,PDF,png,PNG,jpg,JPG,jpeg,JPEG|max:2048',
            // 'is_correct_info' => 'required'

            // 'complainants_full_name' => 'required',
            'complainants_full_name' => 'nullable',
            // 'aadhar_no' => 'required|min:12|max:12',
            'mobile_no' => 'required|min:10|max:10',
            'address' => 'required',
            'email_id' => 'required',
            // 'unauthorized_tap_connection' => 'required',
            'unauthorized_tap_connection' => 'nullable',
            'zone' => 'nullable',
            'ward_area' => 'nullable',
            // 'plot_no' => 'required',
            'plot_no' => 'nullable',
            'house_no' => 'nullable',
            'landmark' => 'nullable',
            // 'unauthorized_connection_address' => 'required',
            'unauthorized_connection_address' => 'nullable',
            // 'current_connection_is_authorized' => 'required',
            'applicant_or_tenant' => 'nullable',
            // 'unauthorized_is_tenant' => 'required',
            // 'criminal_judicial_issue' => 'required',
            // 'existing_connection_detail' => 'required',
            'existing_connection_detail' => 'nullable',
            'place_belongs_to_municipal' => 'nullable',
            'comment' => 'nullable',
            //'application_documents' => 'required|file|mimes:pdf,PDF,png,PNG,jpg,JPG,jpeg,JPEG|max:2048',
             'application_documents' => 'required|file|mimes:pdf,png,jpg,jpeg|max:10240',
              'comments'=>'required|file|mimes:pdf,png,jpg,jpeg|max:10240',
            //'is_correct_info' => 'required',

            'Connection_Type' => 'required',
            // 'House_Number' => 'required',  // Not there in form and get data is null for id D022023MBMC
            'House_Number' => 'nullable',
            'Property_Owner_Name' => 'required',
            'Full_Address_Of_The_Property' => 'required',
            'Water_Connection_Size' => 'required',
            'Water_Connection_Usage' => 'required',
            'zone' => 'required',
            'Ward' => 'required',
            'OutstandingAmt' => 'required',
        ];
    }

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