Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.8
-
Fix Version/s: 1.9.0
-
Component/s: Zend_Validate
-
Labels:None
-
Tags:
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
Reassigned.