|string> */ public function rules(): array { return [ 'KategoriId' => ['required', 'integer', 'exists:Kategori,KategoriId'], 'NamaSubKategori' => ['required', 'string', 'max:255'], Rule::unique('SubKategori', 'NamaSubKategori')->where('KategoriId', $this->KategoriId)->whereNull('deleted_at') ]; } }