ZF-9967: Can't disable locale in IBAN validator

Issue Type: Bug Created: 2010-06-09T01:21:29.000+0000 Last Updated: 2010-09-08T00:26:08.000+0000 Status: Resolved Fix version(s): - 1.10.6 (22/Jun/10)

Reporter: Bert Van Hauwaert (becoded) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:


You can't disable the locale detection in Zend_Validate_Iban when using a Zend_Config (xml).

In xml you need to specify false with a zero.

<pre class="highlight">

but because the validator checks also the type, you can't disable it.

<pre class="highlight">
  if ($locale !== false) {
    /* some code */

It works for me by changing the controle to (without type checking)

<pre class="highlight">
  if ($locale != false) {
    /* some code */


Posted by Thomas Weidner (thomas) on 2010-06-09T12:14:59.000+0000

and why don't you use "auto"?

Posted by Thomas Weidner (thomas) on 2010-06-09T12:26:33.000+0000

Fixed with r22401 Proposed change is problematic. Fixed it differently

Posted by Bert Van Hauwaert (becoded) on 2010-09-08T00:26:06.000+0000

Hello Thomas Could you explain how I can configure the validator with xml? From what I see, everything what I can think of just reads the locale out of the registry. So if I use the config from my original post, I fall in the check

<pre class="highlight">
if (empty($locale)) {
    require_once 'Zend/Registry.php';
    if (Zend_Registry::isRegistered('Zend_Locale')) {
       $locale = Zend_Registry::get('Zend_Locale');

and because that key is defined in my registry, it use that but that is just what I want to avoid.

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.