masked_output
4 sites
Security covered
Masked Output
Masked Output provides configurable field formatters that allow sensitive field values to be partially masked when displayed.
This module is ideal for displaying:
- Account numbers
- Phone numbers
- Reference IDs
- Email addresses
- Any sensitive string field
Features
String Field Masking
- Show last N characters
- Show first N characters
- Mask first N characters
- Mask last N characters
- Custom mask symbol
- Multibyte-safe masking
Email Field Masking
- Masks local-part of email address
- Preserves domain
Technical Highlights
- Service-based architecture
- Dependency injection
- Full test coverage (Unit + Kernel)
- PHPStan level max compliant
- PHPCS Drupal + DrupalPractice compliant
- Drupal 11 ready
- Drupal 13 forward-compatible
Use Cases
- Display masked account numbers like
*****9845 - Show partial IDs in listings
- Mask emails in public views
Installation
composer require drupal/masked_output:^2.0
Maintainer
Maintained by Girish Guntaka.