original_string: public function isValid($value)
      {
          if ($value == $this->allowName) {
              return true;
          }
          
          foreach ($this->getUser()->getGroups() as $group) {
              if ($group->getName() == $value) {
                  $this->error(self::MSG_NOT_UNIQUE, $value);
                  return false;
              }
          }
          return true;
      }
code: public function isValid($value)
      {
          if ($value == $this->allowName) {
              return true;
          }
          
          foreach ($this->getUser()->getGroups() as $group) {
              if ($group->getName() == $value) {
                  $this->error(self::MSG_NOT_UNIQUE, $value);
                  return false;
              }
          }
          return true;
      }
code_tokens: public function isValid ( $ value ) { if ( $ value == $ this -> allowName ) { return true ; } foreach ( $ this -> getUser ( ) -> getGroups ( ) as $ group ) { if ( $ group -> getName ( ) == $ value ) { $ this -> error ( self :: MSG_NOT_UNIQUE , $ value ) ; return false ; } } return true ; }
docstring: Returns true, if the given value is unique among the groups of the user.
  
  Also returns true, if the given value equals the {@link $allowName}.
  
  @param string $value
  @return bool
  @see \Zend\Validator\ValidatorInterface::isValid()
docstring_tokens: Returns true if the given value is unique among the groups of the user .