You are here

class CdnSchemeConstraint in CDN 8.3

A CDN scheme.

Plugin annotation


@Constraint(
  id = "CdnScheme",
  label = @Translation("CDN scheme", context = "Validation"),
)

A scheme or a network-path reference as defined in RFC3986.
(A network-path reference is more commonly known as a "protocol-relative URL"
or a "scheme-relative URL".)

Hierarchy

  • class \Drupal\cdn\Plugin\Validation\Constraint\CdnSchemeConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of CdnSchemeConstraint

See also

https://tools.ietf.org/html/rfc3986#section-3.1

https://tools.ietf.org/html/rfc3986#section-4.2

1 file declares its use of CdnSchemeConstraint
CdnSchemeConstraintValidatorTest.php in tests/src/Unit/Plugin/Validation/Constraint/CdnSchemeConstraintValidatorTest.php

File

src/Plugin/Validation/Constraint/CdnSchemeConstraint.php, line 21

Namespace

Drupal\cdn\Plugin\Validation\Constraint
View source
class CdnSchemeConstraint extends Constraint {
  public $message = 'The provided scheme %scheme is not valid. Provide a scheme like <samp>http://</samp>, or <samp>https://</samp> or to use scheme-relative URLs, use <samp>//</samp>.';

}

Members