Disable notInArray Validator Zend Framework 2

后端 未结 5 2363
醉梦人生
醉梦人生 2021-02-20 12:36

Is there a way to disable notInArray Validator in Zend Framework 2. All the info on the internet shows how to disable the notInArray Validator in Zend Framework 1, for example i

5条回答
  •  礼貌的吻别
    2021-02-20 13:02

    If you don't need validation at all, add required => false in InputFilter

        $this->add(array(
            'name' => 'your-elements-name',
            'required' => false,
        ));
    

    worked for me..

提交回复
热议问题