Issues

ZF-11926: Zend_Validate_Date should not check date format when validating array

Description

When validating an invalid date given as an array the validator the error message should Zend_Validate_Date::INVALID_DATE instead of Zend_Validate_Date::FALSEFORMAT

Comments

My first patch ;)

I've tested your patch...it applies cleanly and works as expected with no visible side-effects. I'm not intimately familiar with this class, and also can't comment on whether changing error message behavior like this is considered a BC break, so I'll have to defer to the component maintainer who can commit your patch if it passes his inspection.

One thing to note for future reference is that your test case should use the {{@group}} annotation to denote the issue the test is associated with, like so:


/**
 * @group ZF-11926
 */
public function testArrayValidationErrorMessage()
...

I assume you modeled your test after the existing ones in that class, and many of those break this rule, so that omission is completely understandable. Using that docblock annotation format allows us to run tests in isolation (ie: to run just tests for this bug, run {{./runtests.sh ZF-11926}} from {{tests}} folder).

Thank you for your contribution!

Thanks for your comment.

I've edited the docblock to annotate the test group properly.

As a bonus for my previous fault I've added a patch to fix the group annotations for the other tests.