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


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.


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

  if ($locale !== false) {
    /* some code */

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

  if ($locale != false) {
    /* some code */


and why don't you use "auto"?

Fixed with r22401 Proposed change is problematic. Fixed it differently

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

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.