ZF-7090: Add range options to Zend_Validate_Date

Issue Type: New Feature Created: 2009-06-22T18:56:16.000+0000 Last Updated: 2012-11-20T22:12:17.000+0000 Status: Open Fix version(s): Reporter: George Cooksey (ssbg) Assignee: None Tags: - Zend_Validate

Related issues: Attachments:


Please add the following class variables, their appropriate getters/setters, and validate appropriately:

  • $_minDay
  • $_maxDay
  • $_minMonth
  • $_maxMonth
  • $_minYear
  • $_maxYear

Day & Month values should be 2 digits (d & m). Year values should be 4 digits (Y).


Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-06-22T18:58:04.000+0000

Assigning to Thomas as for he is maintainer of Zend_Date and does a lot of Zend_Validate stuff. Sorry if I shouldn't...

As to what the issue itself is concerned, imho a minDate and maxDate would be better and more flexible.

Posted by George Cooksey (ssbg) on 2009-06-22T19:08:32.000+0000

I thought about that, but I think breaking it down into the various parts makes it a little easier to configure. Still, min|maxDate could be added as well.

Also, and this is a lot more complicated, parsing "-18 years" or "+30 days" could be useful.

Posted by Gerard Brouwer (gerard.brouwer1) on 2010-05-12T11:24:31.000+0000

For me, past- and future date validation would be enough for now..

Posted by George Cooksey (texdc3) on 2012-11-20T22:12:17.000+0000

Wow, does this count as a necro-ticket?

I recommend using MF's DateRange object for validation.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.