PHPackages                             bbprojectnet/laravel-rules - 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. bbprojectnet/laravel-rules

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

bbprojectnet/laravel-rules
==========================

Additional rules classes for Laravel.

1.0.2(1y ago)1938MITPHPPHP &gt;=8.1.0

Since Feb 19Pushed 1y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Laravel rules
=============

[](#laravel-rules)

This package provides some additional validation rules for Laravel.

Requirements
------------

[](#requirements)

- PHP 8.1 and above
- Laravel 9 or 10

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

[](#installation)

Require this package with composer using the following command:

```
composer require bbprojectnet/laravel-rules
```

Rules
-----

[](#rules)

### Base64

[](#base64)

Checks whether the given string is a base 64 encoded string.

```
return [
	'attribute' => [new Base64()],
];
```

### EnumCase

[](#enumcase)

Checks if the given string is one of the enum cases.

```
return [
	'attribute' => [new EnumCase(Color::class)], // any enum case
	'attribute' => [new EnumCase([Color::Red, Color::Blue])], // selected enum cases
];
```

### Extension

[](#extension)

Checks whether the given filename string has one of the allowed extensions.

```
return [
	'attribute' => [new Extension(['jpg', 'png', 'gif'])],
];
```

### ManyOf

[](#manyof)

Checks whether the values given in a string (separated, for example, by a comma) meet the specified rule.

```
$rule = new Extension(['jpg', 'png']);

return [
	'attribute' => [new ManyOf($rule)],
	'attribute' => [(new ManyOf($rule))->delimeter('|')], // with custom delimeter
];
```

License
-------

[](#license)

The Laravel rules package is open-sourced software licensed under the MIT license.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Total

3

Last Release

580d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/675fcdb8ca5581ded26155cdd2821dbfd7300fa790d1a7acc66f2d02a3b0fb24?d=identicon)[bbprojectnet](/maintainers/bbprojectnet)

---

Top Contributors

[![bbprojectnet](https://avatars.githubusercontent.com/u/1136309?v=4)](https://github.com/bbprojectnet "bbprojectnet (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bbprojectnet-laravel-rules/health.svg)

```
[![Health](https://phpackages.com/badges/bbprojectnet-laravel-rules/health.svg)](https://phpackages.com/packages/bbprojectnet-laravel-rules)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M107](/packages/propaganistas-laravel-phone)[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)[illuminate/validation

The Illuminate Validation package.

18936.7M1.4k](/packages/illuminate-validation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)

PHPackages © 2026

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