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

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

ggbear/validation
=================

Standalone library to use Illuminate\\Validation package outside the Laravel framework.

1.0.1(5y ago)118MITPHP

Since Jul 25Pushed 5y agoCompare

[ Source](https://github.com/sanduluca/validation-factory)[ Packagist](https://packagist.org/packages/ggbear/validation)[ RSS](/packages/ggbear-validation/feed)WikiDiscussions master Synced today

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

Validation
==========

[](#validation)

Standalone library to use Illuminate\\Validation package outside the Laravel framework.

Install Validation:
-------------------

[](#install-validation)

- execute

```
composer require ggbear/validation
```

Usage
-----

[](#usage)

```
require_once __DIR__ . '\..\vendor\autoload.php';
/** @var Factory $validatorFactory */
$validatorFactory = new ValidatorFactory();

$number = '123456789012a';
$id = 123;
$string = 'string value';
$channel = 'UNKNOWN';

$input = [
    'number' => $number,
    'id' => $id,
    'string' => $string,
    'channel' => $channel
];
$rules = [
    'number' => 'required|integer|digits_between:11,12',
    'id' => 'required|integer',
    'string' => 'required|string',
    'channel' => 'required|string|in:WEB,API,SOCKET',
];
$validator = $validatorFactory->make($input, $rules);
```

This will return an instance of `Illuminate\Validation\Validator::class`.

```
if ($validator->fails()) {
    print_r($validator->errors()->toArray());
} else {
    echo 'Validaton passed.' . PHP_EOL;
}
```

You can learn more about the *Laravel Validator* in the [official documentation website](https://laravel.com/docs/7.x/validation).

### About validation rules

[](#about-validation-rules)

-

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

2

Last Release

2169d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/41753987?v=4)[GGBear](/maintainers/GGBear)[@GGBear](https://github.com/GGBear)

### Embed Badge

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

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

###  Alternatives

[propaganistas/laravel-phone

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

3.0k39.7M146](/packages/propaganistas-laravel-phone)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.8M75](/packages/spatie-laravel-honeypot)[intervention/validation

Additional validation rules for the Laravel framework

6827.2M20](/packages/intervention-validation)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M150](/packages/laravel-mcp)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel

3893.6M1](/packages/axlon-laravel-postal-code-validation)[proengsoft/laravel-jsvalidation

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

1.1k2.4M50](/packages/proengsoft-laravel-jsvalidation)

PHPackages © 2026

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