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

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

vakata/validation
=================

A validation class

1.9.10(1y ago)25.4k↓50%1MITPHPCI failing

Since Apr 25Pushed 1y ago2 watchersCompare

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

READMEChangelogDependencies (1)Versions (26)Used By (1)

validation
==========

[](#validation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b8854098a04154dc0bddcee34c18721bd0771db29db92fa2eaaeb14aa55e9648/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616b6174612f76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vakata/validation)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/0fb6886f5eb4a4cf24bb7737328b511ff62a5b018ae04a996df074e8ebc8a75a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76616b6174612f76616c69646174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vakata/validation)[![Code Climate](https://camo.githubusercontent.com/222ef16056c835e747970dec7b131cbd753fb37ca9e967cb1b0a13ab140f5855/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f76616b6174612f76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/vakata/validation)[![Tests Coverage](https://camo.githubusercontent.com/861e2619f331be440da744dfc15c67af441482b04c59a710567ad80ff9487438/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652f6769746875622f76616b6174612f76616c69646174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/vakata/validation)

An extended implementation of the routing class, dealing with an HTTP abstraction and middleware.

Install
-------

[](#install)

Via Composer

```
$ composer require vakata/validation
```

Usage
-----

[](#usage)

```
$v = new \vakata\validation\Validator();
$v
    ->required('name', 'requiredN')->alpha(null, "alphaN")->notEmpty("empty")
    ->required('family', 'requiredF')->alpha(null, "alphaF")
    ->required('age', 'requiredA')->numeric("numericA")
    ->optional("newsletter")->numeric("numericN")
    ->optional("children.*.name")->alpha(null, "alphaC")
    ->optional("children.*.age")->numeric(null, "numericC");
$errors = $v->run($_POST);
// inspect the array - if empty - the data is valid
```

Read more in the [API docs](docs/README.md)

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [vakata](https://github.com/vakata)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance42

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity73

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

Recently: every ~1 days

Total

25

Last Release

468d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.5.0PHP &gt;=7.0.0

### Community

Maintainers

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

---

Top Contributors

[![vakata](https://avatars.githubusercontent.com/u/146052?v=4)](https://github.com/vakata "vakata (37 commits)")

---

Tags

routervakata

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

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