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

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

xaamin/lumen-validation
=======================

v1.0(3y ago)013MITPHP

Since Apr 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xaamin/lumen-validation)[ Packagist](https://packagist.org/packages/xaamin/lumen-validation)[ RSS](/packages/xaamin-lumen-validation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

 [![Build Status](https://github.com/xaamin/lumen-validation/workflows/tests/badge.svg)](https://github.com/xaamin/lumen-validation/actions) [![Total Downloads](https://camo.githubusercontent.com/09ae2ee81166e4dc421b4e6343e1aade51717425ef7a29e605b9d3c9839e3fe2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7861616d696e2f6c756d656e2d76616c69646174696f6e)](https://packagist.org/packages/xaamin/lumen-validation) [![Latest Stable Version](https://camo.githubusercontent.com/8bfa08060be2b5fedcb6c8bcc859b8969869b0fbf86d44cb346fb847511936cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7861616d696e2f6c756d656e2d76616c69646174696f6e)](https://packagist.org/packages/xaamin/lumen-validation) [![License](https://camo.githubusercontent.com/0765cf224dd9ca4a9abb07bd9e587ece6ac7eed1f9f2d3d2bb116091b96e8e1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7861616d696e2f6c756d656e2d76616c69646174696f6e)](https://packagist.org/packages/xaamin/lumen-validation)

Introduction
------------

[](#introduction)

Lumen Validation provides request validation like Laravel does using Form Requests.

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

[](#installation)

This package requires requires php &gt;= 8.0 and lumen &gt;= 9

Step 1 - Install the package on your project

```
composer require xaamin/lumen-validation

```

Step 2 - Add the service provider in bootstrap/app.php

```
$app->register(
    Lumen\Validation\ValidationServiceProvider::class
);

```

Step 3 - Extend your request from `Lumen\Validation\BaseRequest` and injecting it into your controllers automatically will perform the validations. Use the `authorize` method to determine if the user could access the current request.

```
use Lumen\Validation\BaseRequest;

class CreateUserRequest extends BaseRequest
{
    protected function authorize()
    {
        return true;
    }

    protected function rules(): array
    {
        return  [
            'email' => ['required', 'string', 'unique:users'],
            'name' => ['required', 'string', 'max: 200'],
        ];
    }
}

```

License
-------

[](#license)

Lumen Validation is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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

Total

2

Last Release

1118d ago

### Community

Maintainers

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

---

Top Contributors

[![benxaamin](https://avatars.githubusercontent.com/u/21373088?v=4)](https://github.com/benxaamin "benxaamin (18 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[sunspikes/clamav-validator

Custom Laravel 5 anti-virus validator for file uploads.

3651.8M3](/packages/sunspikes-clamav-validator)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

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