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 2w 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 35% 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://avatars.githubusercontent.com/u/10168637?v=4)[Mauri de Souza Meneguzzo](/maintainers/mauri870)[@mauri870](https://github.com/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

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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