UniqueReferenceConstraint.php in CRM Core 8.3
Same filename and directory in other branches
File
modules/crm_core_user_sync/src/Plugin/Validation/Constraint/UniqueReferenceConstraint.phpView source
<?php
namespace Drupal\crm_core_user_sync\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
/**
* Entity Reference unique reference constraint.
*
* Verifies that referenced entities referenced only once.
*
* @Constraint(
* id = "UniqueReference",
* label = @Translation("Unique Entity Reference reference", context = "Validation")
* )
*/
class UniqueReferenceConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'A @entity_type with @field_name referencing entity with ID @id already exists.';
}
Classes
Name | Description |
---|---|
UniqueReferenceConstraint | Entity Reference unique reference constraint. |