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

ActiveLibrary

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 1mo ago

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 49% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

635d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2135928188b18c0cdc0326612451d2367fc37ae97a813d5e253d139be5a97b3?d=identicon)[ramonbakker1992](/maintainers/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

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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