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

Date validator bug issue #6406 #28

Closed
weierophinney opened this issue Dec 31, 2019 · 2 comments
Closed

Date validator bug issue #6406 #28

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Member

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/6407
User: @svycka
Created On: 2014-06-23T13:13:26Z
Updated At: 2015-11-12T09:47:03Z
Body


Comment

User: @ezimuel
Created On: 2014-08-06T16:03:56Z
Updated At: 2014-08-06T16:03:56Z
Body
@svycka what's the goal of this PR? I see only a change in the unit test. Can you explain, please? Thanks.


Comment

User: @Ocramius
Created On: 2014-08-06T16:05:28Z
Updated At: 2014-08-06T16:05:28Z
Body
The issue just shows the failure. It is just in form of a PR so that we:

  • get the tests to run
  • see the actual diff
  • can write a fix on top of that

Comment

User: @svycka
Created On: 2015-03-19T08:42:59Z
Updated At: 2015-03-19T08:42:59Z
Body
This PR shows this bug: zendframework/zendframework#6406

$validator = new \Zend\Validator\Date(array('locale' => 'en', 'format' => 'Y-m-d'));
$validator->isValid(123); // returns true

As @DASPRiD said this was intentionally desired. But I don't see why. also there was a PR zendframework/zendframework#6865 to fix it not for me to decide it was good or no.

@weierophinney what do you think?


Comment

User: @hoppithek
Created On: 2015-11-12T09:46:06Z
Updated At: 2015-11-12T09:47:03Z
Body
+1
totally agree that an interger time should not validate as a formatted date string. The suggested solution in #6406 to make accepted types configurable sounds OK, but I would consider this a bug from the beginning.



Originally posted by @GeeH at zendframework/zend-validator#101

@codisart
Copy link
Contributor

codisart commented Mar 25, 2020

Hello @weierophinney

It seems to me that this issue was resolved by this PR zendframework/zend-validator#275 and can now be closed.
What do you think ?

@michalbundyra
Copy link
Member

@codisart correct, thanks!

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

No branches or pull requests

3 participants