PHPackages                             quantumunit/php-validation - 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. quantumunit/php-validation

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

quantumunit/php-validation
==========================

php validation library

v2.0.3(4y ago)0217MITPHP

Since Nov 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dmeikle/php-validation)[ Packagist](https://packagist.org/packages/quantumunit/php-validation)[ Docs](https://github.com/dmeikle/php-validation)[ RSS](/packages/quantumunit-php-validation/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

php-validation
==============

[](#php-validation)

my first crack at learning PHP back in 2007. Rewritten in 2014 to use YAML instead of XML. Changed from Chain of Command pattern to use basic Load-On-Demand instead.

Usage:
------

[](#usage)

$loader = new YamlConfiguration();
$loader-&gt;loadConfig(\_\_SITE\_PATH . '/validation-config.yml');

//YAML key $key = 'new\_user\_signup'; $validator = new Validator($loader, $this-&gt;getLogger()); //Monolog\\Logger

$result = $validator-&gt;validateRequest($key, $this-&gt;getPostedParams());

Notes:
------

[](#notes)

if $result is an array holding values, it will be an associative array where the fieldname is the index key and the LANG\_STRING (for multi-locale support) is the value of that index.

sample YAML config (validation-config.yml):

failkey: some\_other\_yml\_key

fields:

\#uses 2 validation routines in this example, Required then String - firstname: - class: Required
failkey: VALIDATION\_REQUIRED\_FIELD - class: String
failkey: VALIDATION\_INVALID\_STRING params: maxlength: 20

```
- lastname:
    -
        class: Required
        failkey: VALIDATION_REQUIRED_FIELD
    -
        class: String
        failkey: VALIDATION_INVALID_STRING
        params:
            maxlength: 20

```

\#email is optional in this sample so no Required validation needed - email - class: Email failkey: VALIDATION\_INVALID\_EMAIL

Possible Validation Classes:

```
Address

AlphaNumeric - letters and numbers only

Alphabet	- letters only

BusinessName - letters, numbers, apostrophe, and &()-,.

Currency

Date

Email

IPAddress

Integer

Required

String - letters, spaces and apostrophes

Telephone

URL

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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

Every ~0 days

Total

4

Last Release

1538d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2839039?v=4)[David Meikle](/maintainers/dmeikle)[@dmeikle](https://github.com/dmeikle)

---

Top Contributors

[![dmeikle](https://avatars.githubusercontent.com/u/2839039?v=4)](https://github.com/dmeikle "dmeikle (25 commits)")

---

Tags

phpvalidation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/quantumunit-php-validation/health.svg)

```
[![Health](https://phpackages.com/badges/quantumunit-php-validation/health.svg)](https://phpackages.com/packages/quantumunit-php-validation)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[getgrav/grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS

15.6k86.4k1](/packages/getgrav-grav)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)

PHPackages © 2026

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