class UniqueLabelInListConstraint

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

Uniquely labeled list item constraint.

@Constraint( id = "UniqueLabelInList", label = @Translation("Unique label in list", context = "Validation"), )

@internal

Hierarchy

Expanded class hierarchy of UniqueLabelInListConstraint

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/UniqueLabelInListConstraint.php, line 19

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint
View source
class UniqueLabelInListConstraint extends Constraint {
  
  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = 'The label %label is not unique.';
  
  /**
   * The key of the label that this validation constraint should check.
   *
   * @var null|string
   */
  public $labelKey = NULL;
  
  /**
   * {@inheritdoc}
   */
  public function getRequiredOptions() {
    return [
      'labelKey',
    ];
  }

}

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