Skip to content
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

Validate after:1970-01-01 not works #46150

Closed
ulcuber opened this issue Feb 17, 2023 · 2 comments
Closed

Validate after:1970-01-01 not works #46150

ulcuber opened this issue Feb 17, 2023 · 2 comments

Comments

@ulcuber
Copy link

ulcuber commented Feb 17, 2023

  • Laravel Version: 10.x
  • PHP Version: 8.1

Description:

Timestamp for after:1970-01-01 = 0 which executes condition and sets $date to null then any not zero number is more than null

if (! $date = $this->getDateTimestamp($parameters[0])) {

Steps To Reproduce:

Use validation rule date|after:1970-01-01

Expected to throw:

validator(['date' => '0001-01-01T00:00'], ['date' => 'date|after:1970-01-01'])->validate()
@github-actions
Copy link

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@u01jmg3
Copy link
Contributor

u01jmg3 commented Feb 25, 2023

@driesvints: a PR was merged against this issue so perhaps it can be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants