addError("合成配方不存在"); return false; } if (!$recipe->is_active) { $this->addError("该合成配方已禁用"); return false; } // 将配方信息保存到验证对象中,供后续使用 $recipeKey = $this->args[0] ?? null; if ($recipeKey) { $this->validation->$recipeKey = $recipe; } return true; } catch (\Exception $e) { $this->addError('验证合成配方时发生错误: ' . $e->getMessage()); return false; } } }