public function getIterator() { if (!count($this->errors)) { $this->errors[$this->attribute] = $this->getMessage(); } return new \ArrayIterator($this->errors); }