You are here

class UniqueEntityTitle in Unique entity title 8

Checks that the submitted value is a unique integer.

Plugin annotation


@Constraint(
  id = "UniqueEntityTitle",
  label = @Translation("Unique Entity Title", context = "Validation"),
  type = "string"
)

Hierarchy

  • class \Drupal\unique_entity_title\Plugin\Validation\Constraint\UniqueEntityTitle extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of UniqueEntityTitle

2 string references to 'UniqueEntityTitle'
unique_entity_title_entity_base_field_info_alter in ./unique_entity_title.module
Implements hook_entity_base_field_info_alter().
unique_entity_title_entity_bundle_field_info_alter in ./unique_entity_title.module
Implements hook_entity_bundle_field_info_alter().

File

src/Plugin/Validation/Constraint/UniqueEntityTitle.php, line 16

Namespace

Drupal\unique_entity_title\Plugin\Validation\Constraint
View source
class UniqueEntityTitle extends Constraint {

  /**
   * The message that will be shown if the value is not unique.
   *
   * @var string
   */
  public $notUnique = '%label "%value" is already in use. It must be unique.';

}

Members

Namesort descending Modifiers Type Description Overrides
UniqueEntityTitle::$notUnique public property The message that will be shown if the value is not unique.