public function validateLogoUrl($url)
    {
        if (empty($url)) {
            return true;
        }

        if (!is_string($url)) {
            $this->addError('url', 'Url must be a string');
            return false;
        }

        if (mb_strlen($url, 'UTF-8') > 255) {
            $this->addError('url', 'Url length has to be less or equal to 255');
            return false;
        }

        if (filter_var($url, FILTER_VALIDATE_URL) === false) {
            $this->addError('url', 'Url must contain protocol and domain name');
            return false;
        }

        return true;
    }
public function validateLogoUrl($url)
    {
        if (empty($url)) {
            return true;
        }

        if (!is_string($url)) {
            $this->addError('url', 'Url must be a string');
            return false;
        }

        if (mb_strlen($url, 'UTF-8') > 255) {
            $this->addError('url', 'Url length has to be less or equal to 255');
            return false;
        }

        if (filter_var($url, FILTER_VALIDATE_URL) === false) {
            $this->addError('url', 'Url must contain protocol and domain name');
            return false;
        }

        return true;
    }
public function validateLogoUrl ( $ url ) { if ( empty ( $ url ) ) { return true ; } if ( ! is_string ( $ url ) ) { $ this -> addError ( 'url' , 'Url must be a string' ) ; return false ; } if ( mb_strlen ( $ url , 'UTF-8' ) > 255 ) { $ this -> addError ( 'url' , 'Url length has to be less or equal to 255' ) ; return false ; } if ( filter_var ( $ url , FILTER_VALIDATE_URL ) === false ) { $ this -> addError ( 'url' , 'Url must contain protocol and domain name' ) ; return false ; } return true ; }
Validate logo url

@param mixed $url

@return bool
Validate logo url