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;
    }
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;
    }
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 ; }
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()
Returns true if the given value is unique among the groups of the user .