You are here

class DuplicateFieldConstraint in JSON:API Extras 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/Validation/Constraint/DuplicateFieldConstraint.php \Drupal\jsonapi_extras\Plugin\Validation\Constraint\DuplicateFieldConstraint
  2. 8.2 src/Plugin/Validation/Constraint/DuplicateFieldConstraint.php \Drupal\jsonapi_extras\Plugin\Validation\Constraint\DuplicateFieldConstraint

The constraint object.

Plugin annotation


@Constraint(
  id = "jsonapi_extras__duplicate_field",
  label = @Translation("Duplicate field", context = "Validation")
)

Hierarchy

  • class \Drupal\jsonapi_extras\Plugin\Validation\Constraint\DuplicateFieldConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of DuplicateFieldConstraint

File

src/Plugin/Validation/Constraint/DuplicateFieldConstraint.php, line 15

Namespace

Drupal\jsonapi_extras\Plugin\Validation\Constraint
View source
class DuplicateFieldConstraint extends Constraint {

  /**
   * The error message for the constraint.
   *
   * @var string
   */
  public $message = 'The override must be unique.';

}

Members

Namesort descending Modifiers Type Description Overrides
DuplicateFieldConstraint::$message public property The error message for the constraint.