Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Linkit 7.0.17 Minor update available for module linkit (7.0.17). Release: Paragraphs Editor Enhancements 10.2.0 Minor update available for module paragraphs_ee (10.2.0). Release: Paragraphs Editor Enhancements 10.1.1 Minor update available for module paragraphs_ee (10.1.1). Release: Trash 3.0.34 Minor update available for module trash (3.0.34). Release: Paragraphs Editor Enhancements 10.0.9 Minor update available for module paragraphs_ee (10.0.9). Release: Trash 3.1.0 Minor update available for module trash (3.1.0). Release: Paragraphs Sets 3.0.4 Minor update available for module paragraphs_sets (3.0.4). Release: Paragraphs Sets 3.1.0 Minor update available for module paragraphs_sets (3.1.0). Usage Milestone: Schemata Module schemata crossed 1,000 active installs. Module Revived: CVA (Class Variance Authority) 1.0.1 Module cva updated after 7 months of inactivity (1.0.1).

Entity Name Uniqueness

No security coverage

Part of the Entity ecosystem · 229 projects

View on drupal.org

Entity Name Uniqueness provides shared validation for Drupal configuration entities whose human-readable names must be unique. It prevents duplicate names that differ only by letter case or surrounding whitespace, ensuring a consistent administration experience.

Features

Entity Name Uniqueness provides reusable validation logic for configuration entities.

Features include:

  • Prevents duplicate configuration entity names.
  • Treats names as case-insensitive.
  • Ignores leading and trailing whitespace when validating names.
  • Provides validation at both form and entity save levels.
  • Protects programmatic entity saves as well as UI-based edits.
  • Reusable base classes for configuration entities and entity forms.
  • Utility service for custom validation scenarios.

Typical use cases include:

  • Connection and integration entities.
  • External service configuration records.
  • Mailbox, queue, or provider definitions.
  • Any configuration entity where administrators select items by name.
  • Custom modules that require human-readable names to remain unique.

Post-Installation

This module has no configuration page and requires no administrator setup.

Developers can begin using the functionality immediately by extending the provided base classes in their custom configuration entities and forms.

For most use cases:

  1. Install and enable the module.
  2. Extend UniqueNameConfigEntityBase for configuration entities.
  3. Extend UniqueNameEntityForm for entity forms.
  4. Entity names will automatically be validated for uniqueness.

The module can also be used through its helper service when custom validation logic is required.

Additional Requirements

  • Drupal 11

No additional libraries, services, APIs, or contributed modules are required.

This module is intended for developers building custom Drupal solutions that define configuration entities.

It is particularly useful for integration and configuration management modules where entities are frequently selected by their display names.

Similar Projects

Many Drupal projects implement their own custom validation to prevent duplicate configuration names.

Entity Name Uniqueness provides a reusable, centralized solution that can be shared across multiple modules, reducing duplicate code and ensuring consistent validation behaviour.

Supporting this Module

Issues, bug reports, feature requests, and community contributions are welcome through the Drupal.org issue queue.

Feedback from developers helps improve the module and identify additional validation use cases.

Community Documentation

Documentation is provided in the project README and includes examples showing:

  • How to implement unique-name validation using the supplied base classes.
  • How to validate names using the helper utility.
  • How uniqueness checks behave when editing existing entities.

Developer Notes

The uniqueness check compares trimmed entity labels using a case-insensitive comparison. Validation is scoped to a specific entity type, allowing the same name to exist in different configuration entity types while preventing duplicates within the same type.

The entity save validation ensures protection even when entities are created or updated programmatically rather than through standard Drupal administration forms.

This one is actually much easier to get approved on Drupal.org because it's narrowly scoped, has a single clear responsibility, and has no external dependencies.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Sep 2026
Latest release
7 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.x-dev Dev 11 Sep 18, 2026