/**
  * @param string $value
  * @return bool
  * @throws \TYPO3\CMS\Extbase\Validation\Exception\InvalidValidationConfigurationException
  */
 public function isValid($value)
 {
     if ($this->options['repository'] && $this->options['property']) {
         if ($this->objectManager->isRegistered($this->options['repository'])) {
             $repository = $this->objectManager->get($this->options['repository']);
             $methodName = 'countBy' . ucfirst($this->options['property']);
             $count = $repository->{$methodName}($value);
             if ($count == 0) {
                 return TRUE;
             } else {
                 $error = new \TYPO3\CMS\Extbase\Validation\Error('Email address is not available', 1325202490);
                 $this->result->addError($error);
                 return FALSE;
             }
         }
     }
     throw new \TYPO3\CMS\Extbase\Validation\Exception\InvalidValidationConfigurationException('Invalid configuration for the CICRegister Unique Validator. Annotation should include a valid repository name and a property name', 1325114848);
 }