Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Unique Field AJAX

1,391 sites Security covered
View on drupal.org

This module allows site builders to enforce unique values for fields, checking against existing entries within the same bundle and language. It supports custom error messages and can perform checks using Ajax as the user types.

Yet another but more light-weight and optionally more client-side field input check module for site builders to set up fields being checked if the user input is unique by bundle and language supporting customised error messages and optional Ajax form check for every instance separately.

Not all fields are currently supported please see "Field support" section for more details.

Versions

2.x

(recommend) Built upon 8.x-1.x so there should be no problems upgrading all changes and fixes will be here and this version is compatible with D8, D9, D10 & D11.

3.x

(WIP) Refactoring and rebuilding to be ready for Drupal 10/11 using a better system of services and reusable api methods.

8.x-1.x

The original version built for Drupal 8, not recommend for new projects as no improvements will be applied, only any security issues.

Installation and configuration

Install the module like any other module depending on your project setup via admin UI, via Drush or via Composer. The settings for the behaviour can be changed for every field separately in the field settings form.

If correctly installed, enable the "unique" checkbox in the field settings form for the field where you need to make sure the input needs to be unique.

Additionally, if you want it to make it work per language, enable the per_lang checkbox. If you want to check via Ajax from input check on change event, then enable the use ajax checkbox.

Finally there is a text field providing a default error message which can be changed for your needs for any field instance separately.

Field support

At the moment not all field types are supported, please see the list below:

  • string
  • list_string
  • text
  • email
  • entity_reference
  • link
  • integer
  • decimal

Related or similar modules

Unique field (Drupal 7 only)

The Unique field input check works on node entity fields, the user entity fields and the term entity fields. In comparison, the Unique field ajax module works on the field entity itself and implements and Ajax check callback for the input being unique per language.

Activity

Total releases
1
First release
Jul 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
2.2.3 Stable Jul 8, 2025