class MappingCollectionConstraint

Checks that at least one of the given constraints is satisfied.

Overrides the Symfony constraint to convert the array of constraint IDs to an array of constraint objects and use them.

Attributes

#[Constraint(id: 'MappingCollection', label: new TranslatableMarkup('Validate mapping as a Collection', [], [ 'context' => 'Validation', ]))]

Hierarchy

Expanded class hierarchy of MappingCollectionConstraint

1 file declares its use of MappingCollectionConstraint
MappingCollectionConstrainTest.php in core/tests/Drupal/KernelTests/Core/Validation/MappingCollectionConstrainTest.php

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/MappingCollectionConstraint.php, line 18

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint
View source
class MappingCollectionConstraint extends Collection implements CompositeConstraintInterface {
  
  /**
   * {@inheritdoc}
   */
  public static function getCompositeOptionStatic() : string {
    return 'fields';
  }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
MappingCollectionConstraint::getCompositeOptionStatic public static function Returns the name of the property or properties that contain constraints. Overrides CompositeConstraintInterface::getCompositeOptionStatic

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