Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Field Nif, Nie or Cif

70 sites Security covered Drupal 9–11
View on drupal.org

This module validates Spanish NIF, NIE, and CIF numbers entered by users, ensuring the correct format and validity of the numbers and their corresponding check digits. It can be added as a field to content types and integrates with the Webform module to ensure only valid data is submitted.

The Spain NIF, NIE and CIF Field module provides a Drupal field type for entering and validating Spanish NIF, NIE, and CIF identification numbers.

The module validates each identifier's format and control character. It does not verify whether an identifier has been officially issued or belongs to a specific person or organization.

Features

- Supports Spanish NIF, NIE, and CIF identification numbers.
- Can be added to content types and other fieldable entity bundles.
- Lets site builders choose which identification types editors may enter.
- Provides an optional smart mode that detects the identification type
automatically from a single input.
- Accepts lowercase input and common visual separators such as spaces, dots,
and hyphens.
- Stores values in canonical uppercase format without visual separators.
- Provides accessible live feedback when a type is detected or a value is
invalid.
- Validates field values through Drupal's Validation API, including
entity-aware forms and integrations.
- Keeps manual type selection as the default for backward compatibility.

Webform integration

Enable the optional `field_nif_nie_cif_webform` submodule to add a NIF/NIE/CIF element to Webform.

The Webform element automatically detects NIF, NIE, or CIF values, validates their control character, and stores them in canonical format.

Requirements

- Drupal 9.4, 10, or 11.
- PHP 8.1 or later.
- Drupal Field module.
- Webform is required only for the optional Webform integration.

Installation

Install the module using Composer:

`composer require drupal/field_nif_nie_cif`

Enable the optional Webform integration with:

`drush en field_nif_nie_cif_webform`

Depends on

Dependencies of the latest stable release

  • field Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Jan 2025
Latest release
2 weeks ago
Releases (12 mo)
2 ▼ from 5
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.2.0 Stable 9–11 Aug 14, 2026
1.0.9 Stable 9–11 Aug 13, 2026
1.0.8 Stable 9–11 Mar 11, 2025
1.0.7 Stable 9–11 Feb 15, 2025
1.0.6 Stable 9–11 Feb 15, 2025
1.0.5 Stable 9–11 Jan 30, 2025
1.0.4 Stable 9–10 Jan 14, 2025