Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Entity Name Uniqueness

No security coverage Under active development 1 sites

Part of the Entity ecosystem · 309 projects

This module ensures that configuration entity names are unique, even when differing only by case or whitespace. It provides reusable validation logic to prevent duplicate names for items like connection details or service configurations, improving administrative consistency.

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.

Ask your assistant about Entity Name Uniqueness

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

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