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

ActiveFramework-component[Validation &amp; Sanitization](/categories/validation)

rioter/validation
=================

v2.0.0(10y ago)027PHPPHP &gt;=5.5

Since Jan 31Pushed 10y ago1 watchersCompare

[ Source](https://github.com/iirioterii/newValidation)[ Packagist](https://packagist.org/packages/rioter/validation)[ RSS](/packages/rioter-validation/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (10)Used By (0)

ITCourses framework validation component README
===============================================

[](#itcourses-framework-validation-component-readme)

**ITCourses framework validation component**

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

[](#installation)

Package is available on [Packagist](http://packagist.org/packages/rioter/validation), you can install it using [Composer](http://getcomposer.org).

```
composer require rioter/validation
```

[PHP](https://php.net) 5.5+

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

[](#basic-usage)

Use namespaces

```
use Rioter\Validation\Validator;
use Rioter\Validation\Rules;
```

Create object of Validator class

```
$v = new Validator();
```

For example you have $\_POST data

```
$_POST = ['id'=>'12', 'name' => ' Alexandr'];
```

Add aliases

```
$v
    ->setAlias('name', 'Username')
    ->setAlias('id', 'Id пользователя')
;
```

Php standart functions

```
$v
    ->addFunc('name', 'trim')
;
```

Add rules

```
$v
    ->addRule('id', new Rules\IsNumeric())
    ->addRule('id', new Rules\IsBool())
    ->addRule('name', new Rules\MaxLength(4))
;
```

isValid return true if validation is passed and return false if validation is not passed

```
$v->isValid($_POST);
```

You can get array of errors

```
$v->getErrors();
```

Output:

```
Array
(
  [id] =>
    Array
    (
      [0] => 'Id пользователя должно быть булевым значением'
    )
  [name] =>
    Array
    (
      [0] => 'Username должен быть не более 4 символов'
    )
)

```

Rules
-----

[](#rules)

- **NotEmpty**
- **Date**
- **Email**
- **IsBool**
- **IsFloat**
- **IsInteger**
- **IsNumeric**
- **MinLength**
- **MaxLength**
- **Length**
- **MinNumber**
- **MaxNumber**
- **NumRange**
- **Positive**
- **Negative**
- **NotEmpty**
- **Equal**
- **NotEqual**
- **Matches**
- **Regexp**

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

9

Last Release

3687d ago

Major Versions

v1.1.2 → v2.0.02016-02-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f157a0dd778cec5961f9971b50429bd272bfdc7b080829c6929f41b7b81b453?d=identicon)[iirioterii](/maintainers/iirioterii)

---

Top Contributors

[![iirioterii](https://avatars.githubusercontent.com/u/13174735?v=4)](https://github.com/iirioterii "iirioterii (31 commits)")

---

Tags

validationiirioterii

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[composer/semver

Version comparison library that offers utilities, version constraint parsing and validation.

3.3k479.5M567](/packages/composer-semver)[giggsey/libphonenumber-for-php

A library for parsing, formatting, storing and validating international phone numbers, a PHP Port of Google's libphonenumber.

5.0k145.4M364](/packages/giggsey-libphonenumber-for-php)[respect/validation

The most awesome validation engine ever created for PHP

5.9k36.6M349](/packages/respect-validation)[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k34.5M83](/packages/propaganistas-laravel-phone)[opis/json-schema

Json Schema Validator for PHP

64135.0M145](/packages/opis-json-schema)[giggsey/libphonenumber-for-php-lite

A lite version of giggsey/libphonenumber-for-php, which is a PHP Port of Google's libphonenumber

7911.8M31](/packages/giggsey-libphonenumber-for-php-lite)

PHPackages © 2026

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