PHPackages                             thtg88/laravel-exists-without-soft-deleted-rule - 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. thtg88/laravel-exists-without-soft-deleted-rule

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

thtg88/laravel-exists-without-soft-deleted-rule
===============================================

Provide a Laravel `exists` validation rule that excludes soft-deleted models.

v0.3.0(5y ago)017.1k↑66.7%1MITPHP

Since May 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/thtg88/laravel-exists-without-soft-deleted-rule)[ Packagist](https://packagist.org/packages/thtg88/laravel-exists-without-soft-deleted-rule)[ RSS](/packages/thtg88-laravel-exists-without-soft-deleted-rule/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (5)Used By (1)

Laravel Exists Without Soft Deleted Validation Rule
===================================================

[](#laravel-exists-without-soft-deleted-validation-rule)

Most of my applications use models with the `SoftDeletes` trait.

Therefore on all my validation rules I always have to specify the `whereNull` additional statement to an `exists` validation rule.

This package provide a shortcut `exists_without_soft_deleted` rule for it.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Validation Rule](#validation-rule)
- [License](#license)
- [Security Vulnerabilities](#security-vulnerabilities)

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

[](#installation)

```
composer require thtg88/laravel-exists-without-soft-deleted-rule
```

You can publish the configuration file and views by running:

```
php artisan vendor:publish --provider="Thtg88\ExistsWithoutSoftDeletedRule\ExistsWithoutSoftDeletedRuleServiceProvider"
```

Usage
-----

[](#usage)

Laravel Exists Without Soft Deleted Validation Rule exposes a validation rule to check existence of a model, without soft-deleted ones.

### Validation Rule

[](#validation-rule)

The validation rule is available using `exists_without_soft_deleted`.

If you are validating the `name` attribute on the `users` table for example, you can use the rule as:

```
'name' => 'exists_without_soft_deleted:users',

```

For other example of usage, it's equivalent to Laravel's `exists` rule.

See the [official Laravel documentation](https://laravel.com/docs/7.x/validation#rule-exists) for more information

License
-------

[](#license)

Laravel Exists Without Soft Deleted Validation Rule is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within Laravel Exists Without Soft Deleted Validation Rule, please send an e-mail to Marco Marassi at . All security vulnerabilities will be promptly addressed.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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

Total

4

Last Release

1948d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16927402?v=4)[Marco Marassi](/maintainers/thtg88)[@thtg88](https://github.com/thtg88)

---

Top Contributors

[![thtg88](https://avatars.githubusercontent.com/u/16927402?v=4)](https://github.com/thtg88 "thtg88 (29 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thtg88-laravel-exists-without-soft-deleted-rule/health.svg)

```
[![Health](https://phpackages.com/badges/thtg88-laravel-exists-without-soft-deleted-rule/health.svg)](https://phpackages.com/packages/thtg88-laravel-exists-without-soft-deleted-rule)
```

###  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)[illuminate/validation

The Illuminate Validation package.

18936.7M1.4k](/packages/illuminate-validation)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

74310.9M66](/packages/laravel-mcp)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)

PHPackages © 2026

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