PHPackages                             lupuscoding/din-validator - 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. lupuscoding/din-validator

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

lupuscoding/din-validator
=========================

Package to validate strings for DIN specifications

1.0.0(3y ago)033MITPHPPHP &gt;=7.4

Since Jun 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/LupusCoding/din-validator)[ Packagist](https://packagist.org/packages/lupuscoding/din-validator)[ Docs](http://lupuscoding.de)[ RSS](/packages/lupuscoding-din-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

din-validator - DIN Validator
=============================

[](#din-validator---din-validator)

Library to validate if strings meet specific DIN Specifications.

Currently, included specs:

- DIN SPEC 91379

Contents
--------

[](#contents)

- [Requirements](#requirements)
- [Install](#install)
- [Usage](#usage)
- [Development](#development)
- [Testing](#testing)

Requirements [\#](#requirements)
--------------------------------

[](#requirements-)

- PHP &gt;= 7.4

Install [\#](#install)
----------------------

[](#install-)

```
composer require lupuscoding/din-validator
```

Usage [\#](#usage)
------------------

[](#usage-)

To validate a string for a certain DIN specification, it is recommended to use the static ValidatorFactory methods.

For example: We want to validate an user input for DIN SPEC 91379

```
function testUserInput(string $input) {
    // do some stuff
    if (!LupusCoding\DinValidator\ValidatorFactory::validateDinSpec91379($input)) {
        // do something if input is not valid
    }
    // do other stuff
}
```

You are also able to use specific tests, if you need more detailed information. The majority validator methods of this library should work on basis of a single character. Because of this, you should be able to test single characters if they are part of the specification. For this, initialize the class, related to the required specification (src/Specs/) and search for a method to fit your needs.

Development [\#](#development)
------------------------------

[](#development-)

- Every contribution should respect PSR-2 and PSR-12.
- Methods must provide argument types and return types.
- Class properties must be typed.
- doc blocks must only contain descriptive information.
- doc blocks may additionally contain a type declaration for arguments or return values, if the type declaration is not precise.

For example: `func(): array` may not be precise if the method returns an array of arrays or objects. Consider a doc block entry like `@return array[]` or `@return MyObject[]` for clarification.

Testing [\#](#testing)
----------------------

[](#testing-)

First install **phpunit** by executing

```
composer install
```

Then start phpunit by executing

```
vendor/bin/phpunit
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

1441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9778bcba284a3c7b5ad0bee8577d852823ab8b0ef3048b54172534ab5539395?d=identicon)[LupusCoding](/maintainers/LupusCoding)

---

Top Contributors

[![LupusCoding](https://avatars.githubusercontent.com/u/25911406?v=4)](https://github.com/LupusCoding "LupusCoding (5 commits)")

---

Tags

specdin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lupuscoding-din-validator/health.svg)

```
[![Health](https://phpackages.com/badges/lupuscoding-din-validator/health.svg)](https://phpackages.com/packages/lupuscoding-din-validator)
```

###  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)
