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

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

phpatom/validation
==================

A validation library for psr7 request

v0.1.1(5y ago)022MITPHP

Since Sep 14Pushed 5y agoCompare

[ Source](https://github.com/phpatom/validation)[ Packagist](https://packagist.org/packages/phpatom/validation)[ RSS](/packages/phpatom-validation/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

### Validation

[](#validation)

![Status](https://camo.githubusercontent.com/263f3694f42afc27e06a1ff829cd63884893b55624e13a16893dd0a3ba772b94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d6163746976652d737563636573732e737667)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](/LICENSE)

---

 An intuitive library to validate PSR-7 server requests

📝 Table of Contents
-------------------

[](#-table-of-contents)

- [Prerequisites](#prerequisites)
- [Installing](#installing)
- [Testing](#testing)
- [Coding Style](#coding_style)
- [Getting Started](#getting_started)
- [Usage](#usage)
- [Contributing](#contributing)
- [Authors](#authors)

Prerequisites
-------------------------------------------------------

[](#prerequisites-)

- PHP 7.3 +
- Composer

Installing
-------------------------------------------------

[](#installing-)

The recommended way to install is via Composer:

```
composer require phpatom/validation

```

Testing Installing
------------------------------------------------------

[](#testing-installing-)

```
composer test

```

### Coding style

[](#coding-style-)

```
./vendor/bin/phpcs

```

Getting Started
-----------------------------------------------------------

[](#getting-started-)

```
$v = new \Atom\Validation\Validator();
$v->assert("title")->is()->present()->filled()->alphaNumeric()->between(10,255);
$v->assert("post_id")->onQueryParams()->is()->present()->filled()->and()->follows(new PostExistenceConstraint());
$v->assert("content")->is()->presentAndFilled();
$v->assert("featured_image")->on(\Atom\Validation\Scope::files())->is()->present()->file()->image()->lessThan(200000);
$v->assert("created_at")->is()->present()->filled()->date()->and()->before("now");

$v->validate($request); // throw ValidationException
//OR
$v->check($request);
if($v->failed()){
   return $v->errors();
}
```

Usage
---------------------------------------

[](#usage-)

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

[](#contributing-)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

✍️ Author
---------------------------------------------

[](#️-author-)

- [@dani-gouken](https://github.com/dani-gouken) - Idea &amp; Initial work

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Every ~13 days

Total

2

Last Release

2059d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/60be0245dc2ad769d369accc8b2c8a4a6c68e0675c393562e825efb0b73d5c4d?d=identicon)[Nghokeng Daniel](/maintainers/Nghokeng%20Daniel)

---

Top Contributors

[![dani-gouken](https://avatars.githubusercontent.com/u/54918247?v=4)](https://github.com/dani-gouken "dani-gouken (8 commits)")

---

Tags

validationpsr7atomform

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[siriusphp/validation

Data validation library. Validate arrays, array objects, domain models etc using a simple API. Easily add your own validators on top of the already dozens built-in validation rules

181743.3k13](/packages/siriusphp-validation)[barbieswimcrew/zip-code-validator

Constraint class for international zipcode validation

772.3M](/packages/barbieswimcrew-zip-code-validator)[fp/jsformvalidator-bundle

Javascript validation for sf\[2|3|4\] forms.

132418.8k1](/packages/fp-jsformvalidator-bundle)[apy/jsfv-bundle

Symfony2 Javascript Form Validation Bundle with localisation support

92770.5k](/packages/apy-jsfv-bundle)[laravel-lang/attributes

Translation of form element names

273.8M11](/packages/laravel-lang-attributes)

PHPackages © 2026

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