how to disable inArray validator forms in zend framework2

前端 未结 3 1572
庸人自扰
庸人自扰 2021-01-06 04:44

i use this in my Form:

$this->add(array(     
    \'type\' => \'Zend\\Form\\Element\\Select\',       
    \'name\' => \'county\',
    \'registerInAr         


        
3条回答
  •  礼貌的吻别
    2021-01-06 05:39

    In ZF1, this is what works:

    // using the element instance:
    $element->setRegisterInArrayValidator(false);
    
    // or a configuration key as part of the options array:
    'registerInArrayValidator' => false
    
    // or
    element.options.registerInArrayValidator = false
    

提交回复
热议问题