src/Validator/MongoDbConnectionString.php
public function isValid($value)
    {
        $this->databaseError = null;

        // Empty connection string is valid (defaults to localhost:defaultPort)
        if (!empty($value) && !preg_match($this->pattern, $value)) {
            $this->error(self::INVALID);

            return false;
        }

        return true;
    }
public function isValid($value)
    {
        $this->databaseError = null;

        // Empty connection string is valid (defaults to localhost:defaultPort)
        if (!empty($value) && !preg_match($this->pattern, $value)) {
            $this->error(self::INVALID);

            return false;
        }

        return true;
    }
public function isValid ( $ value ) { $ this -> databaseError = null ; // Empty connection string is valid (defaults to localhost:defaultPort) if ( ! empty ( $ value ) && ! preg_match ( $ this -> pattern , $ value ) ) { $ this -> error ( self :: INVALID ) ; return false ; } return true ; }
Returns true if the passed string is a valid mongodb connection string.

{@inheritDoc}

@param  string $value
Returns true if the passed string is a valid mongodb connection string .