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

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

muizabdul29/simple-validator
============================

v1.2.0(8y ago)125MITPHPPHP &gt;=7.1

Since Nov 4Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (13)Used By (0)

Simple Validator for PHP
------------------------

[](#simple-validator-for-php)

Simple Validator is simple PHP library for validation purposes. It requires NO dependencies. It is inspired by [vlucas/valitron](https://github.com/vlucas/valitron). Following are the differences between the two:

- Style of defining rules is different. In [valitron](https://github.com/vlucas/valitron), it is done rules-wise whereas in this library it is done field wise which is more easier to manage.
- It has been written from the scratch while keeping minimum required PHP version as 7.1. It has resulted in better (and much less) code.
- Keep in mind, it is not exactly same as [valitron](https://github.com/vlucas/valitron) and contains comparitively less (and different) features.

Requirements
------------

[](#requirements)

Simple Validator requires PHP 7.1 or newer.

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

[](#installation)

You can install it using [composer](http://getcomposer.org)

```
composer require muizabdul29/simple-validator

```

Examples
--------

[](#examples)

1. Basic Usage:

```
use Simple\Validator;

// This may be $_POST variable or whatever
$data = [
    'name' => 'Abdul Muiz'
];

// This is how you define rules
$rules = [
    'name' => [ 'required', ['lengthBetween', 2, 16] ]
];

$v = new Validator();

if ($v->validate($rules, $data)) {
    echo 'Valid';
} else {
    echo 'Invalid';
}
```

NOTE: The documentation is incomplete.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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

Recently: every ~0 days

Total

11

Last Release

3100d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20123334?v=4)[Muiz Sheikh](/maintainers/muizabdul29)[@muizabdul29](https://github.com/muizabdul29)

---

Top Contributors

[![muizabdul29](https://avatars.githubusercontent.com/u/20123334?v=4)](https://github.com/muizabdul29 "muizabdul29 (23 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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