'required|exists:debitures,id', 'npwp' => 'nullable|string|max:16', 'email' => 'nullable|email|max:100', 'phone' => 'nullable|string|max:20', 'hubungan_pemilik_jaminan_id' => 'nullable|exists:hubungan_pemilik_jaminan,id', 'province_code' => 'nullable|exists:provinces,code', 'city_code' => 'nullable|exists:cities,code', 'district_code' => 'nullable|exists:districts,code', 'village_code' => 'nullable|exists:villages,code', 'name' => 'required', 'address' => 'nullable|string', 'postal_code' => 'nullable|string|max:10', 'status' => 'nullable|boolean', ]; $rules['nomor_id'] = 'nullable|max:16|unique:pemilik_jaminan,nomor_id,debiture_id,' . $this->debiture_id; return $rules; } /** * Determine if the user is authorized to make this request. */ public function authorize() : bool { return true; } }