class UniqueLabelInListConstraint in Drupal 10
Uniquely labeled list item constraint.
@Constraint( id = "UniqueLabelInList", label = @Translation("Unique label in list", context = "Validation"), )
@internal
Hierarchy
- class \Drupal\ckeditor5\Plugin\Validation\Constraint\UniqueLabelInListConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of UniqueLabelInListConstraint
File
- core/
modules/ ckeditor5/ src/ Plugin/ Validation/ Constraint/ UniqueLabelInListConstraint.php, line 19
Namespace
Drupal\ckeditor5\Plugin\Validation\ConstraintView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UniqueLabelInListConstraint:: |
public | property | The key of the label that this validation constraint should check. | |
UniqueLabelInListConstraint:: |
public | property | The default violation message. | |
UniqueLabelInListConstraint:: |
public | function |