src/Entity/Fields/Traits/String/UrlFieldTrait.php
protected static function validatorMetaForPropertyUrl(ValidatorClassMetaData $metadata): void
    {
        $metadata->addPropertyConstraint(
            UrlFieldInterface::PROP_URL,
            new Url([
                        'relativeProtocol' => true,
                        'protocols'        => ['http', 'https'],
                    ])
        );
    }
protected static function validatorMetaForPropertyUrl(ValidatorClassMetaData $metadata): void
    {
        $metadata->addPropertyConstraint(
            UrlFieldInterface::PROP_URL,
            new Url([
                        'relativeProtocol' => true,
                        'protocols'        => ['http', 'https'],
                    ])
        );
    }
protected static function validatorMetaForPropertyUrl ( ValidatorClassMetaData $ metadata ) : void { $ metadata -> addPropertyConstraint ( UrlFieldInterface :: PROP_URL , new Url ( [ 'relativeProtocol' => true , 'protocols' => [ 'http' , 'https' ] , ] ) ) ; }
This method validates that the url is valid

It allows the protocol to be ommitted, eg //www.edmondscommerce.co.uk

You can extend the list of allowed protocols as you see fit
This method validates that the url is valid