public function hasChildren() { if (!$this->valid()) { return false; } return $this->current() instanceof NestedValidationException; }