Version 1
[yaffs-website] / web / modules / contrib / media_entity_slideshow / src / Plugin / Validation / Constraint / ItemsCountConstraint.php
1 <?php
2
3 namespace Drupal\media_entity_slideshow\Plugin\Validation\Constraint;
4
5 use Symfony\Component\Validator\Constraint;
6
7 /**
8  * Check number of slideshow items.
9  *
10  * @Constraint(
11  *   id = "ItemsCount",
12  *   label = @Translation("Slideshow items count", context = "Validation"),
13  * )
14  */
15 class ItemsCountConstraint extends Constraint {
16
17   /**
18    * Source field name.
19    *
20    * @var string
21    */
22   public $sourceFieldName;
23
24   /**
25    * The default violation message.
26    *
27    * @var string
28    */
29   public $message = 'At least one slideshow item must exist.';
30
31 }