route('barangay'); return [ 'name' => ['required', 'string', 'max:191'], 'city_municipality_id' => ['required', 'integer', 'exists:cities_municipalities,id'], 'psgc_code' => [ 'nullable', 'string', 'max:12', Rule::unique('barangays', 'psgc_code')->ignore($barangayId), ], 'code' => [ 'nullable', 'string', 'max:16', Rule::unique('barangays', 'code')->ignore($barangayId), ], 'urban_rural' => ['required', 'string', 'in:urban,rural,unknown'], 'population' => ['nullable', 'integer', 'min:0'], 'boundary' => ['required', 'array', 'min:3'], 'boundary.*.lat' => ['required', 'numeric', 'between:-90,90'], 'boundary.*.lng' => ['required', 'numeric', 'between:-180,180'], ]; } }