PHPackages                             alpha-zeta/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. alpha-zeta/validation

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

alpha-zeta/validation
=====================

php validation library

1.2.12(4mo ago)0751MITPHPPHP ^8.2

Since Sep 9Pushed 3w ago1 watchersCompare

[ Source](https://github.com/JackRabbit911/validation)[ Packagist](https://packagist.org/packages/alpha-zeta/validation)[ RSS](/packages/alpha-zeta-validation/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (1)

Validation
==========

[](#validation)

Install
-------

[](#install)

composer require alpha-zeta/validation

Usage
-----

[](#usage)

(for example)

```
use Az\Validation\Middleware\ValidationMiddleware;
use Auth\Model\ModelUser;
use Psr\Http\Message\ServerRequestInterface;

class DataValidation extends ValidationMiddleware
{
    public function __construct(private ModelUser $modelUser){}

    protected function setRules(ServerRequestInterface $request)
    {
        $this->validation->rule('username', 'required|username|length(5, 15)')
            ->rule('email', 'required|email')
            ->rule('email', [$this->modelUser, 'isUniqueEmail'])
            ->rule('password', 'required|password|minLength(8)')
            ->rule('confirm', 'required|confirm(:data)')
            ->rule('agree', 'yes|boolean');
    }
}
```

### Or

[](#or)

```
use Az\Validation\Validation;
use Auth\Model\ModelUser;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Server\RequestHandlerInterface;

class DataValidation extends ValidationMiddleware
{
    public function __construct(
        private Validation $validation,
        private ModelUser $modelUser
    ){}

    public function process(
        ServerRequestInterface $request,
        RequestHandlerInterface $handler
    ): ResponseInterface
    {
        $this->validation->rule('username', 'required|username|length(5, 15)')
            ->rule('email', 'required|email')
            ->rule('email', [$this->modelUser, 'isUniqueEmail'])
            ->rule('password', 'required|password|minLength(8)')
            ->rule('confirm', 'required|confirm(:data)')
            ->rule('agree', 'yes|boolean');

        $data = $request->getParsedBody();
        $session = $request->getAttribute('session');

        if (!$this->validation->check($data)) {
            $session->flash('validation', $this->validation->getResponse());
            return new RedirectResponse($request->getServerParams()['HTTP_REFERER'], 302);
        }

        unset($data['confirm']);
        unset($data['agree']);

        return $handler->handle($request->withParsedBody($data));
    }
}
```

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

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 ~43 days

Recently: every ~38 days

Total

13

Last Release

140d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6129183?v=4)[JackRabbit911](/maintainers/JackRabbit911)[@JackRabbit911](https://github.com/JackRabbit911)

---

Top Contributors

[![JackRabbit911](https://avatars.githubusercontent.com/u/6129183?v=4)](https://github.com/JackRabbit911 "JackRabbit911 (80 commits)")

---

Tags

phpvalidation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alpha-zeta-validation/health.svg)

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

###  Alternatives

[yorcreative/laravel-argonaut-dto

Argonaut is a lightweight Data Transfer Object (DTO) package for Laravel that supports nested casting, recursive serialization, and validation out of the box. Ideal for service layers, APIs, and clean architecture workflows.

1063.4k2](/packages/yorcreative-laravel-argonaut-dto)

PHPackages © 2026

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