ZF-6374: Zend_Validate_Date don't make use of the application-wide locale

Description

Application - Wide Locale is ignored within the Zend_Validate_Date class.

The first IF - condition is the problem. It uses only Zend_Date::isValid (which use the application wide locale if no locale is set as parameter) if a locale is in the Validation object set. Otherwise it uses hard coded validation rules which make absolutely no sense in multilanguage applications.


if (($this->_format !== null) or ($this->_locale !== null)) {
            require_once 'Zend/Date.php';
            if (!Zend_Date::isDate($value, $this->_format, $this->_locale)) {
                if ($this->_checkFormat($value) === false) {
                    $this->_error(self::FALSEFORMAT);
                } else {
                    $this->_error(self::INVALID);
                }
                return false;
            }

...

don't make use of the application-wide locale

Comments

Reassigned.

Under code review since 28.06.2009 (r16343)

New feature implemented with r16377