-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[10.x] Fix breaking changes in before validation #49947
Conversation
@calebdw 🤔 |
$v = new Validator($trans, ['y' => '1970-01-01'], ['x' => 'nullable|date', 'y' => 'nullable|date|before:x']); | ||
$this->assertTrue($v->passes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe was ever true, so should be removed (or just reverse the condition). Essentially every date is "after" null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it can be after null but cannot be before null? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe was ever true, so should be removed (or just reverse the condition). Essentially every date is "after"
null
okay before:x test was failing before adding all of those conditions too 🫡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But after:x was not? Why did you close?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by mistakenly added with old branch
I had a PR #49871 to fix Issue #49863 but from this #49871 (comment) conversation it looks breaking change.
if it is a breaking change then this PR will solve it. added tests for it too.