class FileUriUnique in Drupal 9
Same name and namespace in other branches
- 8 core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.php \Drupal\file\Plugin\Validation\Constraint\FileUriUnique
Supports validating file URIs.
Plugin annotation
@Constraint(
id = "FileUriUnique",
label = @Translation("File URI", context = "Validation")
)
Hierarchy
- class \Drupal\file\Plugin\Validation\Constraint\FileUriUnique extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of FileUriUnique
1 string reference to 'FileUriUnique'
- File::baseFieldDefinitions in core/
modules/ file/ src/ Entity/ File.php - Provides base field definitions for an entity type.
File
- core/
modules/ file/ src/ Plugin/ Validation/ Constraint/ FileUriUnique.php, line 15
Namespace
Drupal\file\Plugin\Validation\ConstraintView source
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';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FileUriUnique:: |
public | property | ||
FileUriUnique:: |
public | function |