PHPackages                             mohammedalkutrani/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. mohammedalkutrani/validator

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

mohammedalkutrani/validator
===========================

validate form-data

v1.0.1(6y ago)671MITPHP

Since Jan 27Pushed 6y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (6)Used By (0)

Validator
=========

[](#validator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/26b015733f238d29a454ac4bc49e613a01b87da9b5fdda02dd28082291eabb54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f68616d6d6564616c6b757472616e692f76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mohammedalkutrani/validator)

It's a simple packge for validation the data before touch your database.

Core Features
-------------

[](#core-features)

- PSR-4 for autoloading.
- PSR-2 for coding style.
- Strategy Pattern for changing the rules in the runtime.
- Facade Pattern for make it esey to use.
- Implements your own rule.
- Test 100%.

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

[](#installation)

`composer require mohammedalkutrani/validator`

Simple Usage
------------

[](#simple-usage)

```
    use Validator\Facade\Validation;
    use Validator\Rules;

    $v = Validation::make(
        [
            // the given data.
            'name' => 'mohammedalkutrani@gmail.com',
            'age' => 25
        ], [
            // the rules for the data.
            'name' => [Rules::NUMBER, Rules::MIN.'|4'],
            'age' => [Rules::EMAIL]
        ]
    );

    // check if it passed
    if(!$v->isPassed()) // it will return boolean
    {
        print_r($v->getMessages()); // getting the messages.
    }

```

The result

```
    Array
    (
        [name] => Array
            (
                [0] => the name should be a number
                [1] => the name should shorter then 4
            )

        [age] => Array
            (
                [0] => the age should be an email
            )

    )
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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

5

Last Release

2286d ago

Major Versions

v0.0.0.x-dev → v1.0.02020-01-27

### Community

Maintainers

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

---

Top Contributors

[![MohammedAlkutrani](https://avatars.githubusercontent.com/u/24508555?v=4)](https://github.com/MohammedAlkutrani "MohammedAlkutrani (66 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mohammedalkutrani-validator/health.svg)

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

###  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)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M446](/packages/nette-forms)[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)

PHPackages © 2026

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