FileUriUnique.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\file\Plugin\Validation\ConstraintFile
core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.phpView source
<?php
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';
}
}
Classes
Name | Description |
---|---|
FileUriUnique | Supports validating file URIs. |