src/php/Validator.php
public function validateUrl($url)
    {
        if ('' === $url) {
            return $this;
        }

        if (!is_string($url) || strlen($url) > 2000) {
            throw new InvalidArgumentException(
                'URL must be a string of at most 2,000 characters',
                400
            );
        }

        return $this;
    }
public function validateUrl($url)
    {
        if ('' === $url) {
            return $this;
        }

        if (!is_string($url) || strlen($url) > 2000) {
            throw new InvalidArgumentException(
                'URL must be a string of at most 2,000 characters',
                400
            );
        }

        return $this;
    }
public function validateUrl ( $ url ) { if ( '' === $ url ) { return $ this ; } if ( ! is_string ( $ url ) || strlen ( $ url ) > 2000 ) { throw new InvalidArgumentException ( 'URL must be a string of at most 2,000 characters' , 400 ) ; } return $ this ; }
Validates the given URL.

@param string $url URL/URI to attach to the event.

@return $this

@throws InvalidArgumentException Thrown if the URL is invalid.
Validates the given URL .