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

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

rudra/validation
================

Rudra framework

v26.1(6mo ago)14642MPL-2.0PHPPHP &gt;=8.3CI passing

Since Jun 25Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/Jagepard/Rudra-Validation)[ Packagist](https://packagist.org/packages/rudra/validation)[ RSS](/packages/rudra-validation/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (2)

[![PHPunit](https://github.com/Jagepard/Rudra-Validation/actions/workflows/php.yml/badge.svg)](https://github.com/Jagepard/Rudra-Validation/actions/workflows/php.yml)[![Maintainability](https://camo.githubusercontent.com/1d4f980bbf5fef9eeb260fc9e02a0922d5af43ef53c10e087b8017b8b4aa111a/68747470733a2f2f716c74792e73682f6261646765732f39336364323062392d376234392d343563302d616231322d3233333831313835643238662f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/Jagepard/projects/Rudra-Validation)[![CodeFactor](https://camo.githubusercontent.com/2e5738f93b2e5669451d19b9d6d492669e97fa072437f06948aec3c9b3633852/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6a616765706172642f72756472612d76616c69646174696f6e2f6261646765)](https://www.codefactor.io/repository/github/jagepard/rudra-validation)[![Coverage Status](https://camo.githubusercontent.com/ac47e291aed6c6fb43d0123d19b0f92ba2dc30e2754e420b36cb3df6610cd145/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4a616765706172642f52756472612d56616c69646174696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Jagepard/Rudra-Validation?branch=master)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#)

Rudra-Validation | [API](https://github.com/Jagepard/Rudra-Validation/blob/master/docs.md "Documentation API")
==============================================================================================================

[](#rudra-validation--api)

### Install / Установка

[](#install--установка)

```
composer require rudra/validation

```

### Example of usage / Пример использования

[](#example-of-usage--пример-использования)

```
use Rudra\Validation\ValidationFacade;

$_SESSION['csrf'][] = '123456';

$processed = [
    'set_without_validation' => ValidationFacade::set('set_without_validation')->run();
    'set_with_data_clearing' => ValidationFacade::sanitize(' String ')->run();

    'required' => ValidationFacade::set('required')->required()->run(),
    'integer'  => ValidationFacade::set(12345)->required()->integer()->run(),
    'minimum'  => ValidationFacade::set('12345')->required()->min(5)->run();
    'maximum'  => ValidationFacade::set('12345')->required()->max(5)->run();
    'equals'   => ValidationFacade::set('12345')->equals('12345')->run();
    'email'    => ValidationFacade::email('user@example.com')->run();
    'csrf'     => ValidationFacade::set('123456')->csrf($_SESSION['csrf'])->run();
];
```

Data is validated in a chain
Данные проверяются по цепочке

### For example / Например

[](#for-example--например)

```
ValidationFacade::sanitize(' 12345 ')->required()->min(3)->max(10)->equals('12345')->run();
ValidationFacade::email('user@example.com')->max(25)->run();
```

### Data validation check / Проверка валидности данных

[](#data-validation-check--проверка-валидности-данных)

```
if (ValidationFacade::approve($processed)) {
    $validated = ValidationFacade::getValidated($processed, ["csrf", "_method"]);
}
```

##### getValidated

[](#getvalidated)

Gets an array of validated data excluding the keys \["csrf", "\_method"\]
Получает массив проверенных данных исключая ключи \["csrf", "\_method"\]

### Get all error messages / Получить все сообщения об ошибках

[](#get-all-error-messages--получить-все-сообщения-об-ошибках)

```
ValidationFacade::getAlerts($processed, ['required']);
```

##### getAlerts

[](#getalerts)

Gets an array with error messages excluding the keys \['required'\]
Получает массив с сообщениями об ошибках исключая ключи \['required'\]

License
-------

[](#license)

This project is licensed under the **Mozilla Public License 2.0 (MPL-2.0)** — a free, open-source license that:

- Requires preservation of copyright and license notices,
- Allows commercial and non-commercial use,
- Requires that any modifications to the original files remain open under MPL-2.0,
- Permits combining with proprietary code in larger works.

📄 Full license text: [LICENSE](./LICENSE)
🌐 Official MPL-2.0 page:

---

Проект распространяется под лицензией **Mozilla Public License 2.0 (MPL-2.0)**. Это означает:

- Вы можете свободно использовать, изменять и распространять код.
- При изменении файлов, содержащих исходный код из этого репозитория, вы обязаны оставить их открытыми под той же лицензией.
- Вы **обязаны сохранять уведомления об авторстве** и ссылку на оригинал.
- Вы можете встраивать код в проприетарные проекты, если исходные файлы остаются под MPL.

📄 Полный текст лицензии (на английском): [LICENSE](./LICENSE)
🌐 Официальная страница:

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance70

Regular maintenance activity

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

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

Total

4

Last Release

183d ago

Major Versions

v25.12 → v26.12025-12-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/75e65761bdd94035d1c783773a706d5722ce3164fe55d9722581c2cb4a642d8c?d=identicon)[jagepard](/maintainers/jagepard)

---

Top Contributors

[![Jagepard](https://avatars.githubusercontent.com/u/4591345?v=4)](https://github.com/Jagepard "Jagepard (150 commits)")

---

Tags

rudravalidationvalidation-libraryvalidatorvalidatorvalidationrudravalidation library

### Embed Badge

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

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

###  Alternatives

[respect/validation

The most awesome validation engine ever created for PHP

6.0k39.0M408](/packages/respect-validation)[opis/json-schema

Json Schema Validator for PHP

65141.2M263](/packages/opis-json-schema)[vlucas/valitron

Simple, elegant, stand-alone validation library with NO dependencies

1.6k4.6M135](/packages/vlucas-valitron)[intervention/validation

Additional validation rules for the Laravel framework

6777.1M18](/packages/intervention-validation)[proengsoft/laravel-jsvalidation

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

1.1k2.3M50](/packages/proengsoft-laravel-jsvalidation)[wixel/gump

A fast, extensible &amp; stand-alone PHP input validation class that allows you to validate any data.

1.2k1.4M31](/packages/wixel-gump)

PHPackages © 2026

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