src/Validator/Validator.php
public function validate($uuid)
    {
        $uuid = str_replace(['urn:', 'uuid:', '{', '}'], '', $uuid);

        if ($uuid === Uuid::NIL || preg_match('/' . self::VALID_PATTERN . '/D', $uuid)) {
            return true;
        }

        return false;
    }
public function validate($uuid)
    {
        $uuid = str_replace(['urn:', 'uuid:', '{', '}'], '', $uuid);

        if ($uuid === Uuid::NIL || preg_match('/' . self::VALID_PATTERN . '/D', $uuid)) {
            return true;
        }

        return false;
    }
public function validate ( $ uuid ) { $ uuid = str_replace ( [ 'urn:' , 'uuid:' , '{' , '}' ] , '' , $ uuid ) ; if ( $ uuid === Uuid :: NIL || preg_match ( '/' . self :: VALID_PATTERN . '/D' , $ uuid ) ) { return true ; } return false ; }
Validate that a string represents a UUID

@param string $uuid
@return bool Returns TRUE if the string was validated as a valid UUID or FALSE on failure
Validate that a string represents a UUID