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

Breadcrumb

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

function AtLeastOneOf::__construct

Parameters

array<Constraint>|array<string,mixed>|null $constraints An array of validation constraints:

string[]|null $groups:

string|null $message Intro of the failure message that will be followed by the failed constraint(s) message(s):

string|null $messageCollection Failure message for All and Collection inner constraints:

bool|null $includeInternalMessages Whether to include inner constraint messages (defaults to true):

Overrides Composite::__construct

File

vendor/symfony/validator/Constraints/AtLeastOneOf.php, line 42

Class

AtLeastOneOf
Checks that at least one of the given constraint is satisfied.

Namespace

Symfony\Component\Validator\Constraints

Code

public function __construct(mixed $constraints = null, ?array $groups = null, mixed $payload = null, ?string $message = null, ?string $messageCollection = null, ?bool $includeInternalMessages = null) {
    parent::__construct($constraints ?? [], $groups, $payload);
    $this->message = $message ?? $this->message;
    $this->messageCollection = $messageCollection ?? $this->messageCollection;
    $this->includeInternalMessages = $includeInternalMessages ?? $this->includeInternalMessages;
}

API Navigation

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