PHPackages                             programmatordev/yet-another-php-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. programmatordev/yet-another-php-validator

Abandoned → [programmatordev/fluent-validator](/?search=programmatordev%2Ffluent-validator)ArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

programmatordev/yet-another-php-validator
=========================================

PHP validator with expressive error messages

v1.3.0(1y ago)218.2k↓75%MITPHPPHP &gt;=8.1CI passing

Since Aug 11Pushed 1y agoCompare

[ Source](https://github.com/programmatordev/yet-another-php-validator)[ Packagist](https://packagist.org/packages/programmatordev/yet-another-php-validator)[ RSS](/packages/programmatordev-yet-another-php-validator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (18)Used By (0)

Yet Another PHP Validator
=========================

[](#yet-another-php-validator)

[![Latest Version](https://camo.githubusercontent.com/cac1db90fe87444231ca870e2bf4558b7825d7c76f5b04acfa005b93a01b5b13/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f70726f6772616d6d61746f726465762f7965742d616e6f746865722d7068702d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/programmatordev/yet-another-php-validator/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Tests](https://github.com/programmatordev/yet-another-php-validator/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/programmatordev/yet-another-php-validator/actions/workflows/ci.yml?query=branch%3Amain)

PHP validator with expressive error messages.

Tip

This library has been archived in favor of the [Fluent Validator](https://github.com/programmatordev/fluent-validator) library. Check it out if you're interested in the same validation style.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher.

Installation
------------

[](#installation)

Install the library via [Composer](https://getcomposer.org/):

```
composer require programmatordev/yet-another-php-validator
```

Basic Usage
-----------

[](#basic-usage)

Simple usage looks like:

```
use ProgrammatorDev\Validator\Validator;

// do this:
$validator = Validator::type('int')->greaterThanOrEqual(18);

// and validate with these:
$validator->validate(16); // returns bool: false
$validator->assert(16, 'age'); // throws exception: The age value should be greater than or equal to 18.
```

Documentation
-------------

[](#documentation)

- [Get Started](docs/01-get-started.md)
- [How to Use](docs/02-usage.md)
    - [Usage](docs/02-usage.md#usage)
    - [Methods](docs/02-usage.md#methods)
    - [Error Handling](docs/02-usage.md#error-handling)
    - [Custom Error Messages](docs/02-usage.md#custom-error-messages)
- [Rules](docs/03-rules.md)
- [Custom Rules](docs/04-custom-rules.md)

Contributing
------------

[](#contributing)

Any form of contribution to improve this library (including requests) will be welcome and appreciated. Make sure to open a pull request or issue.

Acknowledgments
---------------

[](#acknowledgments)

This library is inspired by [respect/validation](https://github.com/Respect/Validation) and [symfony/validator](https://github.com/symfony/validator).

License
-------

[](#license)

This project is licensed under the MIT license. Please see the [LICENSE](LICENSE) file distributed with this source code for further information regarding copyright and licensing.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance40

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity61

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

Recently: every ~33 days

Total

17

Last Release

642d ago

Major Versions

v0.8.0 → v1.0.02024-04-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/831bb375fc093d45e6f6ed3d7fb1d15656db5e0a8fca6ef3e212e60aa6e698b3?d=identicon)[programmatordev](/maintainers/programmatordev)

---

Top Contributors

[![andrepimpao](https://avatars.githubusercontent.com/u/41913452?v=4)](https://github.com/andrepimpao "andrepimpao (314 commits)")

---

Tags

phpphp-validationphp-validatorphp8validationvalidatorphpvalidatorvalidationphp8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/programmatordev-yet-another-php-validator/health.svg)

```
[![Health](https://phpackages.com/badges/programmatordev-yet-another-php-validator/health.svg)](https://phpackages.com/packages/programmatordev-yet-another-php-validator)
```

###  Alternatives

[iamfarhad/validation

🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes &amp; more. Modern Laravel 10-12 support with both ValidationRule objects &amp; string-based rules.

2917.3k](/packages/iamfarhad-validation)

PHPackages © 2026

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