PHPackages                             tinylara/tinyvalidator - 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. tinylara/tinyvalidator

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

tinylara/tinyvalidator
======================

Tiny PHP validator.

v1.2(11y ago)6287MITPHPPHP &gt;=5.4.0

Since Mar 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/TinyLara/TinyValidator)[ Packagist](https://packagist.org/packages/tinylara/tinyvalidator)[ RSS](/packages/tinylara-tinyvalidator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

TinyLara\\TinyValidator
=======================

[](#tinylaratinyvalidator)

[![Latest Stable Version](https://camo.githubusercontent.com/42cf3af065ad97890f73d32442853017a0dc54cd32c8bae50745599443d34b35/68747470733a2f2f706f7365722e707567782e6f72672f74696e796c6172612f74696e7976616c696461746f722f762f737461626c652e737667)](https://packagist.org/packages/tinylara/tinyvalidator) [![Total Downloads](https://camo.githubusercontent.com/a0591c160c8514fb156026ac04c1a71c74eb2faf961d75dfcfb5ebb1cf608058/68747470733a2f2f706f7365722e707567782e6f72672f74696e796c6172612f74696e7976616c696461746f722f646f776e6c6f6164732e737667)](https://packagist.org/packages/tinylara/tinyvalidator) [![License](https://camo.githubusercontent.com/d1552194ff827d2d1731d6c70be2e025ac5a1e25402212f6b0d46ed51e426864/68747470733a2f2f706f7365722e707567782e6f72672f74696e796c6172612f74696e7976616c696461746f722f6c6963656e73652e737667)](https://packagist.org/packages/tinylara/tinyvalidator)

TinyValidator is a tiny validation package. [Read the documentation.](https://github.com/TinyLara/TinyLara/wiki/Validation)

### Install

[](#install)

If you have Composer, just include TinyValidator as a project dependency in your `composer.json`. If you don't just install it by downloading the .ZIP file and extracting it to your project directory.

```
require: {
    "tinylara/tinyvalidator": "*"
}
```

### Examples

[](#examples)

```
$data = ['title'=>'你', 'email'=>'1@baiducom'];
$rules = [
  'title' => 'required|min:3|max:255',
  'email' => 'required|email',
];

$validator = new \TinyLara\TinyValidator\TinyValidator($data, $rules);

if ( !$validator->success ) {
  foreach ($validator->errors as $error) {
    echo $error.'';
  }
}
```

### License

[](#license)

The TinyValidator is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

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

Total

3

Last Release

4080d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2127912?v=4)[吕文翰](/maintainers/JohnLui)[@johnlui](https://github.com/johnlui)

---

Top Contributors

[![johnlui](https://avatars.githubusercontent.com/u/2127912?v=4)](https://github.com/johnlui "johnlui (5 commits)")

### Embed Badge

![Health badge](/badges/tinylara-tinyvalidator/health.svg)

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

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