class UriHostConstraint
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UriHostConstraint.php \Drupal\Core\Validation\Plugin\Validation\Constraint\UriHostConstraint
Checks if a string conforms to the RFC 3986 host component.
Attributes
#[Constraint(id: 'UriHost', label: new TranslatableMarkup('URI host', [], [
'context' => 'Validation',
]))]
Hierarchy
- class \Drupal\Core\Validation\Plugin\Validation\Constraint\UriHostConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of UriHostConstraint
File
-
core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ UriHostConstraint.php, line 15
Namespace
Drupal\Core\Validation\Plugin\Validation\ConstraintView source
class UriHostConstraint extends SymfonyConstraint {
public function __construct(mixed $options = NULL, public string $message = 'This value should conform to RFC 3986 URI host component.', ?array $groups = NULL, mixed $payload = NULL) {
parent::__construct($options, $groups, $payload);
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| UriHostConstraint::__construct | public | function | #[HasNamedArguments] |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.