Issues

ZF-7090: Add range options to Zend_Validate_Date

Description

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

Comments

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.

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.

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

Wow, does this count as a necro-ticket?

I recommend using MF's DateRange object for validation.

http://www.martinfowler.com/eaaDev/Range.html