Issue Type: Improvement Created: 2009-05-08T01:42:12.000+0000 Last Updated: 2011-04-09T20:20:51.000+0000 Status: In Progress Fix version(s): Reporter: Piotr Czachur (zimnyx) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate
Related issues: - ZF-11276
Now we get this confusing situation while Float validator is locale-aware, but Between is not, so we cannot mix them when locale is used for Float validator. Some generic solution should be provided, like adding locale-awareness in Zend_Validate_Abstract and using it inside validators for numbers.
Posted by Thomas Weidner (thomas) on 2009-05-09T02:28:30.000+0000
Please be patient: Only because I began to add locale awareness to some filters it does not mean that these validators don't work.
Each addition has to go through a review process and this takes time.
According to "number validator inside Abstract class"... Definetly no: Abstract should not add validator specific rules or methods.
A validator for StringLength or a Regex validator don't have the need to use localizing methods.
And float and boolean have different needs of localization. This won't work.
Validators have eighter to be independent from each other, OR the extend each other. So when a Between validator needs number validation it should extend Zend_Validate_Number or a related validator.
Posted by Thomas Weidner (thomas) on 2009-06-26T12:11:28.000+0000
@dev-team: The following validators need localization to have a unique API: * Zend_Validate_Between * Zend_Validate_GreaterThan * Zend_Validate_LessThan
The proposed way is to have each validator independently from others even if this would mean to duplicate existing code. The API of all 5 validators (Int and Float are already localized) should be completly the same.
The API itself is * setLocale * getLocale * Setting the locale at initiation * No locale set -> use non-localized behaviour
Have you found an issue?
See the Overview section for more details.