function NoFieldItemsExistWithHigherCardinality::__construct

File

core/modules/field/src/Plugin/Validation/Constraint/NoFieldItemsExistWithHigherCardinality.php, line 20

Class

NoFieldItemsExistWithHigherCardinality
Checks if field items exist that exceed the allowed cardinality.

Namespace

Drupal\field\Plugin\Validation\Constraint

Code

public function __construct(public string $entityType, public string $fieldName, public string $message = "The field '@field_name' of entity type '@entity_type' has more entries (@max_delta) than the cardinality (@cardinality) allows.", ?array $groups = NULL, mixed $payload = NULL) {
  parent::__construct(groups: $groups, payload: $payload);
}

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