unique_field-6.x.png

This project is not covered by Drupal’s security advisory policy.

This module performs additional validation when a node is created or updated by a user to require that a node's title, author, language, and CCK fields are unique within a given context.

Without this module, Drupal and CCK do not prevent multiple nodes from having the same title or the same value in a certain field.

For example, if you have a content type with a date field and there should only be one node per date, you could use this module to prevent a node from being saved with a date already used in another node.

Configuration

Once this module is enabled, it adds a 'Unique field settings' section to each content type's administration page for specifying which fields for that content type must be unique.

The administrator may choose whether the fields must be unique among all other nodes, among nodes of the same content type, or of the same language.

Also, the administrator may specify whether each field must be unique or whether the fields in combination must be unique.

Alternatively, the administrator can select the 'single node' scope, which allows you to require that the values of the specified fields are unique in comparison to each other on only the given node. For example, if a node has multiple user reference fields, this setting will require that no user is selected more than once on one node.

Known issues

  • CCK module compatibility: This module is compatible with the core CCK fields (including text, number, node reference, user reference) as well as fields provided by some contributed modules (including Date and Content Taxonomy).
  • This module is intended to function when a node is being validated prior to being created or updated. It does not prevent nodes from being programmatically saved with duplicate values (including when a node is reverted to an earlier revision). For information on how to validate nodes programmatically, please see: #643972: How to programmatically validate nodes for duplicate values

Similar Module

Unique Field AJAX - This module allows fields to be unique by bundle and language. You can use ajax for check and you can customize the error message.

Initial Development

This module was initially developed by arithmetic
This module's initial development had been sponsored by Icelink Design, J-Seed Ventures, Inc, and Coupons Dealuxe

Supporting organizations: 

Project information

Releases