/** * Performs the server-side validation * * This method also calls validate() on all contained elements. * * @return boolean Whether the container and all contained elements are valid */ protected function validate() { $valid = true; foreach ($this as $child) { $valid = $child->validate() && $valid; } $valid = parent::validate() && $valid; // additional check is needed as a Rule on Container may set errors // on contained elements, see HTML_QuickForm2Test::testFormRule() if ($valid) { foreach ($this->getRecursiveIterator() as $item) { if (0 < strlen($item->getError())) { return false; } } } return $valid; }
/** * Performs the server-side validation * * This method also calls validate() on all contained elements. * * @return boolean Whether the container and all contained elements are valid */ protected function validate() { $valid = parent::validate(); foreach ($this as $child) { $valid = $child->validate() && $valid; } return $valid; }
public function validate() { return parent::validate(); }