PHPackages                             mauri870/request - 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. mauri870/request

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

mauri870/request
================

Extend Laravel 5's request class with support for custom validator rules.

12.8kPHP

Since Feb 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mauri870/request)[ Packagist](https://packagist.org/packages/mauri870/request)[ RSS](/packages/mauri870-request/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel 5 Extended Requests
===========================

[](#laravel-5-extended-requests)

Package that exteds the Laravel 5 FormRequest class to easily create custom validation rules.

Quick start
-----------

[](#quick-start)

### Required setup

[](#required-setup)

In the `require` key of `composer.json` file add the following

```
"mauri870/request": "dev-master"

```

Run the Composer update comand

```
$ composer update

```

How to use
----------

[](#how-to-use)

Make your request extends the `Mauri870\Request\Request` class.

```
use Mauri870\Request\Request;

class MyRequest extends Request {
```

Create your rules function with your custom rule:

```
public function rules()
{
  	return [
       	'my-rule' => 'custom'
    ];
}
```

Create a function with the format `validate`, like this:

```
public function validateCustom($attribute, $value, $params)
{
    return $value == 'custom';
}
```

Do not forget to put a message for this new rule. It can be in the `messages` function of the request or in the `validation` of the lang files.

```
public fucnction messages()
{
	return [
    	'custom' => 'My custom message'
	];
}
```

And that is it HAHA! :) Please enjoy!

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.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.

### Community

Maintainers

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

---

Top Contributors

[![mauri870](https://avatars.githubusercontent.com/u/10168637?v=4)](https://github.com/mauri870 "mauri870 (5 commits)")[![lukzgois](https://avatars.githubusercontent.com/u/231633?v=4)](https://github.com/lukzgois "lukzgois (3 commits)")

### Embed Badge

![Health badge](/badges/mauri870-request/health.svg)

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

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