ZF-11276: Zend_Validate_Between

Issue Type: Improvement Created: 2011-04-09T09:55:26.000+0000 Last Updated: 2011-04-16T22:21:34.000+0000 Status: Closed Fix version(s): Reporter: Samuel (michizend) Assignee: Thomas Weidner (thomas) Tags: - validating

Related issues: - ZF-6577



H Zend Team, like i saw the Zend_Validate_Between supports only english float values like "2.09". It would be an good if it would support europe float convetion like "2,09". Here is my sulution: Replace isValid Mehtod by this:

public function isValid($value) { $this->_setValue($value);

$filter = new Zend_Filter_PregReplace(array('match' => '/\,/',
                                            'replace' => '.'));
$value = $filter->filter($value);

if ($this->_inclusive) {
    if ($this->_min > $value || $value > $this->_max) {
        return false;
} else {
    if ($this->_min >= $value || $value >= $this->_max) {
        return false;
return true;



Posted by Thomas Weidner (thomas) on 2011-04-09T20:20:51.000+0000

Duplication of ZF-6577

Posted by Thomas Weidner (thomas) on 2011-04-09T20:22:55.000+0000

Closing as duplicate

Note that the attached patch will not be integrated as it's behaviour is errorous.

Posted by Samuel (michizend) on 2011-04-10T21:15:54.000+0000

Because of the $this->_setValue($value); , or? filter than may fail?

Posted by Thomas Weidner (thomas) on 2011-04-16T22:21:34.000+0000

No.. the preg_replace itself would allow german numbers be validated in english environment and visa-versa. When we support localization then eighter all or non. The other issue was intended to add full localization. Therefor closing as duplicate and non-integration for this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.