You are here

class UniqueLabelInListConstraint in Drupal 10

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',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UniqueLabelInListConstraint::$labelKey public property The key of the label that this validation constraint should check.
UniqueLabelInListConstraint::$message public property The default violation message.
UniqueLabelInListConstraint::getRequiredOptions public function