Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Date validator bug issue #6406 #6407

Closed
wants to merge 2 commits into from
Closed

Conversation

svycka
Copy link
Contributor

@svycka svycka commented Jun 23, 2014

No description provided.

@ezimuel
Copy link
Contributor

ezimuel commented Aug 6, 2014

@svycka what's the goal of this PR? I see only a change in the unit test. Can you explain, please? Thanks.

@Ocramius
Copy link
Member

Ocramius commented Aug 6, 2014

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

@svycka
Copy link
Contributor Author

svycka commented Mar 19, 2015

This PR shows this bug: #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 #6865 to fix it not for me to decide it was good or no.

@weierophinney what do you think?

@hoppithek
Copy link

+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.

@GeeH
Copy link

GeeH commented Jun 28, 2016

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
New issue can be found at: zendframework/zend-validator#101

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

Successfully merging this pull request may close these issues.

5 participants