public function check() { if (empty($this->contact)) { throw new ValidationException('Contact is not set'); } if (strlen(implode(' ', [$this->contact->getFirstName(), $this->contact->getSurname()])) > 32) { throw new ValidationException('Full name is too long (Should be less than 32'); } }