Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Hostname.php

function Hostname::__construct

Parameters

array<string,mixed>|null $options:

bool|null $requireTld Whether to require the hostname to include its top-level domain (defaults to true):

string[]|null $groups:

Overrides Constraint::__construct

File

vendor/symfony/validator/Constraints/Hostname.php, line 38

Class

Hostname
Validates that a value is a valid host name.

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(?array $options = null, ?string $message = null, ?bool $requireTld = null, ?array $groups = null, mixed $payload = null) {
    parent::__construct($options, $groups, $payload);
    $this->message = $message ?? $this->message;
    $this->requireTld = $requireTld ?? $this->requireTld;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal