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

Abandoned → [laravel/framework](/?search=laravel%2Fframework)ArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

schwarzer/laravel-rules
=======================

Laravel Rules

1.4.0(6d ago)1431MITPHPPHP ^8.3

Since Oct 12Pushed 6d ago2 watchersCompare

[ Source](https://github.com/SchwarzerIT/laravel-rules)[ Packagist](https://packagist.org/packages/schwarzer/laravel-rules)[ Docs](https://github.com/SchwarzerIT/laravel-rules)[ RSS](/packages/schwarzer-laravel-rules/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (12)Versions (6)Used By (0)

Laravel Rules Package (Deprecated)
==================================

[](#laravel-rules-package-deprecated)

> **This package is deprecated and no longer maintained.** Laravel's built-in [`Password`](https://laravel.com/docs/validation#validating-passwords) rule provides the same HIBP breach checking via `uncompromised()` since Laravel 8. Please migrate to the native solution.

Migration Guide
---------------

[](#migration-guide)

### 1. Remove this package

[](#1-remove-this-package)

```
composer remove schwarzer/laravel-rules
```

### 2. Replace validation rules

[](#2-replace-validation-rules)

#### String syntax `hibp`

[](#string-syntax-hibp)

```
// Before
'password' => 'required|string|min:8|hibp',

// After
use Illuminate\Validation\Rules\Password;

'password' => ['required', 'string', Password::min(8)->uncompromised()],
```

#### String syntax with threshold `hibp:min=N`

[](#string-syntax-with-threshold-hibpminn)

```
// Before
'password' => 'required|string|min:8|hibp:min=5',

// After
use Illuminate\Validation\Rules\Password;

'password' => ['required', 'string', Password::min(8)->uncompromised(5)],
```

#### Class syntax `new HaveIBeenPwned()`

[](#class-syntax-new-haveibeenpwned)

```
// Before
use Schwarzer\Laravel\Rules\HaveIBeenPwned;

'password' => ['required', 'string', 'min:8', new HaveIBeenPwned()],

// After
use Illuminate\Validation\Rules\Password;

'password' => ['required', 'string', Password::min(8)->uncompromised()],
```

#### Class syntax with threshold `new HaveIBeenPwned(N)`

[](#class-syntax-with-threshold-new-haveibeenpwnedn)

```
// Before
use Schwarzer\Laravel\Rules\HaveIBeenPwned;

'password' => ['required', 'string', 'min:8', new HaveIBeenPwned(5)],

// After
use Illuminate\Validation\Rules\Password;

'password' => ['required', 'string', Password::min(8)->uncompromised(5)],
```

#### Form Request example

[](#form-request-example)

```
// Before
use Schwarzer\Laravel\Rules\HaveIBeenPwned;

public function rules(): array
{
    return [
        'password' => ['required', 'string', 'min:12', 'confirmed', new HaveIBeenPwned()],
    ];
}

// After
use Illuminate\Validation\Rules\Password;

public function rules(): array
{
    return [
        'password' => ['required', 'string', 'confirmed', Password::min(12)->uncompromised()],
    ];
}
```

### 3. Remove custom translations

[](#3-remove-custom-translations)

You can delete the `hibp` key from your `validation.php` language files. Laravel provides its own `password.uncompromised` translation out of the box.

### Threshold default difference

[](#threshold-default-difference)

This package defaulted to a threshold of **1** (password must appear at least once). Laravel's `uncompromised()` defaults to 0 (any occurrence fails). If you relied on the default, the migration is slightly stricter, which is generally desirable.

Archiving this repository
-------------------------

[](#archiving-this-repository)

This repository is archived and read-only. No further updates will be made.

License
-------

[](#license)

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

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance99

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% 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 ~508 days

Total

5

Last Release

6d ago

PHP version history (3 changes)1.0.0PHP ^7.4

1.2.0PHP ^7.4|^8.0

1.4.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b7fd6e79dc5e46a9019916ae9f637392fe5bd8e5af82ab7d07d551cdd5aaf6d?d=identicon)[Schwarzer IT](/maintainers/Schwarzer%20IT)

---

Top Contributors

[![AndreSchwarzer](https://avatars.githubusercontent.com/u/6991100?v=4)](https://github.com/AndreSchwarzer "AndreSchwarzer (12 commits)")[![scherhak](https://avatars.githubusercontent.com/u/4221861?v=4)](https://github.com/scherhak "scherhak (1 commits)")

---

Tags

laravelruleschwarzer

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

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

Validate that a phone number is in the correct format

69355.5k](/packages/laravel-validation-rules-phone)[timacdonald/rule-builder

A fluent rule builder for Laravel validation rule generation.

1027.7k](/packages/timacdonald-rule-builder)[deligoez/tckimlikno

Turkish Identification Number Verification &amp; Validation Package for Laravel

2917.4k](/packages/deligoez-tckimlikno)

PHPackages © 2026

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