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

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

fhteam/laravel-validator
========================

A bunch of Laravel validators

v2.4.0(3y ago)3775[5 issues](https://github.com/forumhouse-oss/laravel-validator/issues)GPL-2.0-onlyPHPPHP ^8.1CI failing

Since Mar 25Pushed 3y ago4 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (12)Used By (0)

Laravel validation package
==========================

[](#laravel-validation-package)

Metrics\_Version[![PHP version](https://camo.githubusercontent.com/f3a0588bf7bdacfdcdd8152c3ea32110a5afedca09edfb17365381b4bcdbc935/68747470733a2f2f62616467652e667572792e696f2f70682f66687465616d2532466c61726176656c2d76616c696461746f722e737667)](http://badge.fury.io/ph/fhteam%2Flaravel-validator)Compatibility[![Laravel compatibility](https://camo.githubusercontent.com/0c0b22adf25363e4d3b88f8cb4c51d1c5a013f4b5e349d37c587d792d0d7db6a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d382d677265656e2e737667)](http://laravel.com/)Quality[![Code Climate](https://camo.githubusercontent.com/d97ad290cc7853f4a507fb3d1c0b6f572ead8366181b5161d3cd646879aaed2e/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f66687465616d2f6c61726176656c2d76616c696461746f722f6261646765732f6770612e737667)](https://codeclimate.com/github/fhteam/laravel-validator) [![Build Status](https://camo.githubusercontent.com/78fb6d2ce11a37bd5a6bc4a886de8b5beeb5dfc7702829ca2b7e67d1e590f5ab/68747470733a2f2f7472617669732d63692e6f72672f66687465616d2f6c61726176656c2d76616c696461746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fhteam/laravel-validator) [![Coverage Status](https://camo.githubusercontent.com/29f8f8a790fb292fcfd699f4cb6c631531d9f2dfaf656477800bd1bb8475eb0a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f66687465616d2f6c61726176656c2d76616c696461746f722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/fhteam/laravel-validator?branch=master)Features:
---------

[](#features)

- Validation logic is completely separate from objects being validated
- Validation rules and validation failure behaviour can be written in a declarative way in 90% of cases
- Uses Laravel validator core and rules
- Stateful model validation
- Provides OOP way to write and register new validation rules
- Serves as a replacer to a Input::get() to prevent unvalidated data from sneaking into your application
- Rule-based data transformations of validated data before it reaches your application logic (in progress)
- Provides unified way to write rules for controllers and models
- Can validate and aggregate many types of input: $\_GET/$\_POST, $\_FILES, HTTP headers, Session data, Cookies (both PHP native and Laravel's encrypted ones)
- Two types of input validators: middleware (to be manually registered) and validate-when-resolved (just inject and you are done)

Documentation
-------------

[](#documentation)

- Documentation is available [here](https://github.com/fhteam/laravel-validator/wiki)

Quick example:
--------------

[](#quick-example)

```
class OrderControllerValidator extends FrontendControllerValidatorWhenResolved
{
    protected $rules = [
        '*' => [
            'user_id' => 'required|numeric',
        ],
        'getCreate, getShow, getEdit' => [],
        'postOpen, postDelete, postAssignContractor, postCancelContractorAssignment' => [],
        'postCreate' => [
            'title' => 'required|max:100',
            'categoryId' => 'required|numeric',
            'description' => 'required|max:4096',
        ],
        'postEdit, postFileDelete, postFileUpload' => [
            'title' => 'required|max:100',
            'categoryId' => 'required|numeric',
            'description' => 'required|max:4096',
        ],
    ];

    protected $errorRedirects = [
        'getShow' => ['route' => 'home'],
        'postCreate' => ['route' => 'orders_create'],
        'postEdit, postFileUpload, postFileDelete' => ['route' => ['orders_edit', ['orderId' => '#orderId']]],
    ];
}

class OrderController extends Controller
{
    /**
     * @var OrderControllerValidator
     */
    protected $validator;

    /**
     * IoC invoked constructor
     */
    public function __construct(OrderControllerValidator $validator) {
        $this->validator = $validator;
    }

    public function getShowValidatedData() {
        return Response::make($this->validator->description);
    }
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 82.5% 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 ~273 days

Recently: every ~331 days

Total

11

Last Release

1344d ago

Major Versions

v1.0.2 → v2.0.02018-01-25

PHP version history (3 changes)v1.0.0PHP &gt;=5.5.0

v2.3.0PHP ^7.4

v2.4.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/58b0dff9b71ea9cbee66a5995bebcc3d4fa429f603e2e515e56f929a67610f1e?d=identicon)[matyunin](/maintainers/matyunin)

![](https://www.gravatar.com/avatar/03352d49df0742377af31a8a2a838bb13f7b129bd1986dcfb92fd49b52de4c6f?d=identicon)[forumhouse](/maintainers/forumhouse)

![](https://www.gravatar.com/avatar/592993858a0a0493dd7f6168b073d4b802725543f63317dbb2a8f8cafd172ae1?d=identicon)[god6dog](/maintainers/god6dog)

---

Top Contributors

[![FractalizeR](https://avatars.githubusercontent.com/u/318489?v=4)](https://github.com/FractalizeR "FractalizeR (66 commits)")[![god1dog](https://avatars.githubusercontent.com/u/5496458?v=4)](https://github.com/god1dog "god1dog (11 commits)")[![matyunin](https://avatars.githubusercontent.com/u/1249544?v=4)](https://github.com/matyunin "matyunin (2 commits)")[![dntgafck](https://avatars.githubusercontent.com/u/5100988?v=4)](https://github.com/dntgafck "dntgafck (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/fhteam-laravel-validator/health.svg)](https://phpackages.com/packages/fhteam-laravel-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)[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)
