class FieldStorageIndexesConstraint

Same name and namespace in other branches
  1. 11.x core/modules/field/src/Plugin/Validation/Constraint/FieldStorageIndexesConstraint.php \Drupal\field\Plugin\Validation\Constraint\FieldStorageIndexesConstraint

Validates the structure of field storage index definitions.

Attributes

#[Constraint(id: 'FieldStorageIndexes', label: new TranslatableMarkup('Field storage indexes', [], [ 'context' => 'Validation', ]), type: [ 'sequence', ])]

Hierarchy

Expanded class hierarchy of FieldStorageIndexesConstraint

1 file declares its use of FieldStorageIndexesConstraint
FieldStorageIndexesValidationTest.php in core/modules/field/tests/src/Kernel/Config/FieldStorageIndexesValidationTest.php

File

core/modules/field/src/Plugin/Validation/Constraint/FieldStorageIndexesConstraint.php, line 15

Namespace

Drupal\field\Plugin\Validation\Constraint
View source
class FieldStorageIndexesConstraint extends SymfonyConstraint {
  public function __construct(public string $message = 'The field storage indexes definition is invalid.', public string $invalidIndexNameMessage = 'The index key "@index" must be a non-empty string.', public string $invalidIndexMessage = 'The index "@index" must be a non-empty array of column definitions.', public string $invalidColumnMessage = 'The index "@index" has an invalid column definition.', public string $invalidColumnLengthMessage = 'The index "@index" has an invalid length for column "@column".', ?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.