dominik-eller/laravel-data-normalizer
Larablocks Analysis
dominik-eller/laravel-data-normalizer works with Laravel 12 and 13 (latest release v1.3.0, May 6, 2026).
Laravel 10 and 11 in earlier releases.
Recommendation checks
PromisingPromising: maintained and up to date, meets 2 of 4 checks; not yet widely used.
- Works with Laravel 13, the current version
- Released in the last 12 months (May 6, 2026)
- 416 downloads a month (needs 10,000)
- 0 GitHub stars (needs 100)
State
Maintained- Last stable release: May 6, 2026.
- 1 release in the last 12 months.
- First released: Sep 25, 2024.
- Monthly downloads: 416.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 29, 2026.
| Install | |
|---|---|
composer require dominik-eller/laravel-data-normalizer |
|
| Latest Version: | v1.3.0 |
| PHP: | ^8.3 |
| Laravel: | 12 · 13 |
| Older releases: | 10 · 11 |
| License: | MIT |
| Last Updated: | Jun 22, 2026 |
| Links: | GitHub · Packagist |
A Laravel package to normalize and format data such as phone numbers, emails, and other input into standardized formats.
A Laravel package to normalize and format data such as phone numbers, emails, and other input into standardized formats.
Installation
You can install the package via composer:
composer require dominik-eller/laravel-data-normalizer
composer dump-autoload
You can publish the config file with:
php artisan vendor:publish --tag="data-normalizer-config"
This is the contents of the published config file:
return [
'phone' => [
'default_country' => 'DE',
'format' => 'E164',
],
'email' => [
'trim_whitespace' => true,
'lowercase' => true,
],
];
Usage
Normalize a phone number
use Deller\DataNormalizer\Facades\DataNormalizer;
$normalizedPhone = DataNormalizer::create('phone')->normalize('+49 (151) 123 45678');
// $normalizedPhone will be "+4915112345678" (E.164 format)
Format a phone number
use Deller\DataNormalizer\Facades\DataFormatter;
$formattedPhone = DataFormatter::create('phone')->format('+4915112345678', ['format' => 'INTERNATIONAL']);
// $formattedPhone will be "+49 151 1234 5678"
If parsing fails, the formatter logs the error and returns the original value.
Normalize an email address
use Deller\DataNormalizer\Facades\DataNormalizer;
$normalizedEmail = DataNormalizer::create('email')->normalize(' JohnDoe@Example.com ');
// $normalizedEmail will be "johndoe@example.com"
Format an email address
use Deller\DataNormalizer\Facades\DataFormatter;
$formattedEmail = DataFormatter::create('email')->format(' JohnDoe@Example.com ');
// $formattedEmail will be "johndoe@example.com"
Registering a custom formatter
use Deller\DataNormalizer\Factories\DataFormatterFactory;
class CustomFormatter extends \Deller\DataNormalizer\DataFormatter
{
public function format($data)
{
return 'Formatted: ' . strtoupper($data);
}
}
// Register the custom formatter type
DataFormatterFactory::registerType('custom', CustomFormatter::class);
// Use the custom formatter via the facade
$customFormatter = \Deller\DataNormalizer\Facades\DataFormatter::create('custom');
echo $customFormatter->format('some data'); // Output: "Formatted: SOME DATA"
Registering a custom normalizer
use Deller\DataNormalizer\Factories\DataNormalizerFactory;
class CustomNormalizer extends \Deller\DataNormalizer\DataNormalizer
{
public function normalize($data)
{
return 'Normalized: ' . strtolower(trim($data));
}
}
// Register the custom normalizer type
DataNormalizerFactory::registerType('custom', CustomNormalizer::class);
// Use the custom normalizer via the facade
$customNormalizer = \Deller\DataNormalizer\Facades\DataNormalizer::create('custom');
echo $customNormalizer->normalize(' SOME DATA '); // Output: "Normalized: some data"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please report security vulnerabilities by email to me@dominik-eller.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.3.0 | ^8.3 | ^12.0| | MIT | |
| v1.2.1 | ^8.2 | ^11.0| | MIT | |
| v1.2.0 | ^8.2 | ^11.0| | MIT | |
| v1.1.1 | ^8.2 | ^11.0 | MIT | |
| v1.1.0 | ^8.2 | ^11.0 | MIT | |
| v1.0.0 | ^8.2 | ^10.0|| | MIT |