You are here

class UniqueReferenceConstraint in CRM Core 8.3

Same name and namespace in other branches
  1. 8 modules/crm_core_user_sync/src/Plugin/Validation/Constraint/UniqueReferenceConstraint.php \Drupal\crm_core_user_sync\Plugin\Validation\Constraint\UniqueReferenceConstraint

Entity Reference unique reference constraint.

Verifies that referenced entities referenced only once.

Plugin annotation


@Constraint(
  id = "UniqueReference",
  label = @Translation("Unique Entity Reference reference", context = "Validation")
)

Hierarchy

  • class \Drupal\crm_core_user_sync\Plugin\Validation\Constraint\UniqueReferenceConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of UniqueReferenceConstraint

File

modules/crm_core_user_sync/src/Plugin/Validation/Constraint/UniqueReferenceConstraint.php, line 17

Namespace

Drupal\crm_core_user_sync\Plugin\Validation\Constraint
View source
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.';

}

Members

Namesort descending Modifiers Type Description Overrides
UniqueReferenceConstraint::$message public property The default violation message.