Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
RelationshipContactsConstraint
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace Drupal\crm\Plugin\Validation\Constraint;
4
5use Drupal\Core\StringTranslation\TranslatableMarkup;
6use Drupal\Core\Validation\Attribute\Constraint;
7use Symfony\Component\Validator\Constraint as SymfonyConstraint;
8
9/**
10 * Checks that Relationship Contacts are different.
11 */
12#[Constraint(
13  id: 'RelationshipContacts',
14  label: new TranslatableMarkup('Relationship Contacts', [], ['context' => 'Validation'])
15)]
16class RelationshipContactsConstraint extends SymfonyConstraint {
17
18  /**
19   * The message shown when the contacts are different.
20   *
21   * @var string
22   */
23  public $differentMessage = 'Relationship Contacts must be different.';
24
25  /**
26   * The message shown when the contacts are of the wrong type.
27   *
28   * @var string
29   */
30  public $wrongTypeMessage = 'Relationship Contacts must be of type @type.';
31
32}