/** * Get errors actually gets ALL errors in the form, that is errors that have * been added to this object (global errors) as well as all child element errors * * @return array all the errors in this form */ public function getErrors() { $errors = $this->_errors; $items = $this->_view->getAllData(); foreach ($items as $i) { $errors = array_merge($errors, $i->getErrors()); } return $errors; }
/** * Tests that elements that must be unique but have an array * name with an auto key - i.e. "ids[]" doesn't throw an * exception */ public function testValidMultipleElementsWithAutoArray() { $view = new phFormView('validMultipleElementsTestView', new phForm('test', 'validMultipleElementsTestView')); // need to do something that triggers initialize $view->getAllData(); }