UniqueFieldConstraint.php in Drupal 8
File
core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UniqueFieldConstraint.php
View source
<?php
namespace Drupal\Core\Validation\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
class UniqueFieldConstraint extends Constraint {
public $message = 'A @entity_type with @field_name %value already exists.';
public function validatedBy() {
return '\\Drupal\\Core\\Validation\\Plugin\\Validation\\Constraint\\UniqueFieldValueValidator';
}
}