UriHostConstraint.php

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UriHostConstraint.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Core\Validation\Plugin\Validation\Constraint;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;

/**
 * Checks if a string conforms to the RFC 3986 host component.
 */
class UriHostConstraint extends SymfonyConstraint {
    
    /**
     * The error message if validation fails.
     *
     * @var string
     */
    public string $message = 'This value should conform to RFC 3986 URI host component.';

}

Classes

Title Deprecated Summary
UriHostConstraint Checks if a string conforms to the RFC 3986 host component.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.