Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 2
FileUriUnique
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
 validatedBy
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 2
<?php
/**
 * @file
 * Contains \Drupal\file\Plugin\Validation\Constraint\FileUriUnique.
 */
namespace Drupal\file\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
/**
 * Supports validating file URIs.
 *
 * @Constraint(
 *   id = "FileUriUnique",
 *   label = @Translation("File URI", context = "Validation")
 * )
 */
class FileUriUnique extends Constraint {
  public $message = 'The file %value already exists. Enter a unique file URI.';
  /**
   * {@inheritdoc}
   */
  public function validatedBy() {
    return '\Drupal\Core\Validation\Plugin\Validation\Constraint\UniqueFieldValueValidator';
  }
}