public function getErrors($attributeNameOrNames = null) { if (!$this->inside) { $this->inside = true; $errors = parent::getErrors($attributeNameOrNames); $this->inside = false; } else { $errors = array(); } return $errors; }