This module adds a new field type to Drupal with optional pattern validation to match Personal Identification Code (PIC) format. This module does not check if the given PIC is a real or fake, but considers only the format.
Currently supported format checks include:
- Finnish Personal Ideentification code https://en.wikipedia.org/wiki/Nationalidentificationnumber#Finland
Adding more validators is a matter of providing constraint and the validator, see examples in the project Git repository.
Patches for the new constraints and validators are greatly appreciated!
Installation
- Download the module, compser require drupal/personal_id.
- Enable Personal ID -module (personal_id).
- Add a field of type "Personal ID" to an entity - it is grouped with other Text fields. Save field settings.
- In the "[Field name] settings for [bundle name]" page select which "Personal ID validation" you wish to have.
- Note that ALL selected validators must pass for user to be able to submit value in the field.
Version information
Versions 8.x-1.0-beta2
and 2.0.0+
are in functionally identical. While 8.x-1.0-beta2
works for lower Drupal core versions (8.7 and earlier), the 2.0.0
will support only Drupal 8.8.0+ and Drupal 9.
Full release pending tests
Full release of this project is pending only tests #3129029: Add PHPUnit tests.
Project information
- Module categories: Site Structure
- 6 sites report using this module
- Created by rpsu on , updated
- Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.