0
我想爲用戶創建一個表單元素輸入一個日期,但我不斷收到此錯誤:Zend Framework的驗證形式
Invalid validator provided to addValidator; must be string or Zend_Validate_Interface Dont know what im doing wrong
//here is my form code for the date element
$Commenced_Trading_Date = new Zend_Form_Element_Text('Commenced_Trading_Date');
$Commenced_Trading_Date->setLabel('Commenced Trading Date')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addvalidator(array(array('Date', true, array('format'=>'j F Y'))));
這是我做了唯一的代碼。請幫助
這種嘗試,addValidator( '日',真的,陣列('DD-MM-YYYY ')) –