PHPackages                             ramonbakker1992/validation-rules-helper - 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. ramonbakker1992/validation-rules-helper

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

ramonbakker1992/validation-rules-helper
=======================================

This package allows validation rules to be defined globally and reused. This way you can use the same rules for your Controller, Action classes, API post/update routes, Livewire and other sections.

v1.0.1(1y ago)014MITPHPPHP ^8.2

Since Aug 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ramonbakker1992/validation-rules-helper)[ Packagist](https://packagist.org/packages/ramonbakker1992/validation-rules-helper)[ Docs](https://github.com/ramonbakker1992/validation-rules-helper)[ GitHub Sponsors]()[ RSS](/packages/ramonbakker1992-validation-rules-helper/feed)WikiDiscussions main Synced today

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

This package allows validation rules to be defined globally and reused. This way you can use the same rules for your Controller, Action classes, API post/update routes, Livewire and other sections.
=====================================================================================================================================================================================================

[](#this-package-allows-validation-rules-to-be-defined-globally-and-reused-this-way-you-can-use-the-same-rules-for-your-controller-action-classes-api-postupdate-routes-livewire-and-other-sections)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c762cb626c50ada9356d11f9b4b5fe5bae5a8678fa54ec4400ddd0eddaf3cb42/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616d6f6e62616b6b6572313939322f76616c69646174696f6e2d72756c65732d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ramonbakker1992/validation-rules-helper)[![Total Downloads](https://camo.githubusercontent.com/9a8b0306beb9438e2aad8c090a0d9d68592e8e6d17f50aab163336cd8126ffa2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616d6f6e62616b6b6572313939322f76616c69646174696f6e2d72756c65732d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ramonbakker1992/validation-rules-helper)

This package allows validation rules to be defined globally and reused. This way you can use the same rules for your Controller, Action classes, API post/update routes, Livewire and other sections.

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

[](#installation)

You can install the package via composer:

```
composer require ramonbakker1992/validation-rules-helper
```

Usage
-----

[](#usage)

Create a validation class that extends `ValidationRules`

```
class ProjectValidation extends ValidationRules
{
    protected function validation()
    {
        return [
            'name' => 'string|max:100',
            'number' => 'numeric|between:1000,9999',
            'start_date' => 'date',
            'end_date' => 'date|after_or_equal:start_date',
        ];
    }
}
```

Use in controller, action class or where ever you need the validation rules:

```
$rules = ProjectValidation::rules()
    ->required([
        'name',
        'start_date' => 'required_with:end_date'
    ])
    ->all();
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Ramon Bakker](https://github.com/ramonbakker1992)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

687d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15996919?v=4)[Ramon Bakker](/maintainers/ramonbakker1992)[@ramonbakker1992](https://github.com/ramonbakker1992)

---

Top Contributors

[![ramonbakker1992](https://avatars.githubusercontent.com/u/15996919?v=4)](https://github.com/ramonbakker1992 "ramonbakker1992 (7 commits)")

---

Tags

laravelProman Software B.V.validation-rules-helper

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ramonbakker1992-validation-rules-helper/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M97](/packages/dedoc-scramble)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k37](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)

PHPackages © 2026

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