PHPackages                             temir8173/sanitizer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. temir8173/sanitizer

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

temir8173/sanitizer
===================

Json sanitizer

v1.0.0(2y ago)05PHPPHP &gt;=8.1.0

Since Oct 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/temir8173/sanitizer)[ Packagist](https://packagist.org/packages/temir8173/sanitizer)[ RSS](/packages/temir8173-sanitizer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

```

use Temir8173\Sanitizer\DataSanitizer;
use Temir8173\Sanitizer\DataSpecification;
use Temir8173\Sanitizer\DataTypesList;

$jsonData = '{
    "foo": "123.asd",
    "bar": "asd",
    "baz": "8 (707) 288-56-23",
    "arrayField": ["8999654", "8 (707) 288-56-23 123.asd"],
    "nestedStructure": {"field1": 324}
}';
$data = json_decode($jsonData, true);

// Спецификация для данных
$specification = new DataSpecification(
    DataTypesList::STRUCTURE,
    true,
    [
        'foo' => new DataSpecification(DataTypesList::INTEGER, true),
        'bar' => new DataSpecification(DataTypesList::STRING, true),
        'baz' => new DataSpecification(DataTypesList::PHONE, true),
        'arrayField' => new DataSpecification(DataTypesList::ARRAY, true, arrayItemsType: DataTypesList::PHONE),
        'nestedStructure' => new DataSpecification(DataTypesList::STRUCTURE, true, [
            'field1' => new DataSpecification(DataTypesList::STRING, true),
            'field2' => new DataSpecification(DataTypesList::INTEGER, true),
        ])
    ]
);

$sanitizer = new DataSanitizer();
$sanitizer->handle($data, $specification);

echo '';
print_r($data);
print_r($sanitizer->getNormalizedData());
print_r($sanitizer->getErrors());

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

955d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38798bc230b9004a14b92da9dd511678711bf165cc8646be4044b6ba0e516277?d=identicon)[temir8173](/maintainers/temir8173)

---

Top Contributors

[![temir8173](https://avatars.githubusercontent.com/u/29313210?v=4)](https://github.com/temir8173 "temir8173 (1 commits)")[![XanterX98](https://avatars.githubusercontent.com/u/99197269?v=4)](https://github.com/XanterX98 "XanterX98 (1 commits)")

### Embed Badge

![Health badge](/badges/temir8173-sanitizer/health.svg)

```
[![Health](https://phpackages.com/badges/temir8173-sanitizer/health.svg)](https://phpackages.com/packages/temir8173-sanitizer)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
