Support using model name like App\\Model\\User for validatoin rule exists and unique.#7459
Merged
limingxinleo merged 10 commits intohyperf:masterfrom Feb 4, 2026
Merged
Conversation
Member
|
单测也一块搬过来 |
added 2 commits
July 24, 2025 21:00
Contributor
Author
Member
代码审查结果功能概述此PR为验证器的数据库相关规则( 代码分析核心实现在
优点
潜在问题
建议改进
测试覆盖测试用例较为完整,涵盖了:
总体评价这是一个实用的功能增强,能够简化多数据库连接场景下的验证规则使用。代码整体结构合理,测试覆盖充分,建议在考虑上述改进点后合并。 |
Contributor
Author
|
已按照建议调整了代码,也补充了文档 |
zds-s
approved these changes
Sep 4, 2025
Contributor
Author
|
@limingxinleo 这个PR也处理好了,麻烦帮忙看看,谢谢 |
limingxinleo
previously approved these changes
Feb 4, 2026
App\\Model\\User for validatoin rule exists and unique.
limingxinleo
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

目前的规则默认会使用default的数据库连接,当使用多个数据库连接时需要手动拼接连接名称。
传递ModelName::class作为table的值后,会自动解析模型的连接名和表明。
该功能从Laravel同步。