ItemsCountConstraint.php in Media entity slideshow 8
Same filename and directory in other branches
File
src/Plugin/Validation/Constraint/ItemsCountConstraint.phpView source
<?php
namespace Drupal\media_entity_slideshow\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
/**
* Check number of slideshow items.
*
* @Constraint(
* id = "ItemsCount",
* label = @Translation("Slideshow items count", context = "Validation"),
* )
*/
class ItemsCountConstraint extends Constraint {
/**
* Source field name.
*
* @var string
*/
public $sourceFieldName;
/**
* The default violation message.
*
* @var string
*/
public $message = 'At least one slideshow item must exist.';
}
Classes
Name | Description |
---|---|
ItemsCountConstraint | Check number of slideshow items. |