-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requiredIf 规则实现有错误 #2
Labels
Comments
这样看来 你有兴趣的话可以发个 PR 修复下 我其实很少用 我用 |
已经修复,可以更新试下。 |
好的。你这个项目功能很强大,不知道为啥星这么少,还好我发现了这块宝。我会持续关注的,看看还能不能发现别的问题。哈哈! |
O(∩_∩)O哈哈~ 感谢关注。 有问题欢迎提出来,更欢迎提PR 😄 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
requiredIf
的规则应该是: 另一个字段等于某值时,本字段必须; 如果不等于,则不应该检查本字段。但是在我使用的
v2.4.11
版本中,无论另一个字段是否等于某值,本字段都必须。原因是
UserAndContextValidatorsTrait.php 178行
判断另一字段不在匹配值中时直接返回了false。假设改为
return true
让程序暂时正常进行另外一个问题是,如果本字段不存在,在getSafeData()的时候会返回一个值为
null
的字段,我认为不应该返回这个字段。The text was updated successfully, but these errors were encountered: