PHPackages                             ljsystem/laravel-prohibited - 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. ljsystem/laravel-prohibited

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

ljsystem/laravel-prohibited
===========================

Adds prohibited form request validations to your Laravel application.

1.1.0(6y ago)410[3 PRs](https://github.com/ljsystem/laravel-prohibited/pulls)MITPHPPHP ^7.2

Since Feb 13Pushed 3y agoCompare

[ Source](https://github.com/ljsystem/laravel-prohibited)[ Packagist](https://packagist.org/packages/ljsystem/laravel-prohibited)[ Docs](https://github.com/ljsystem/laravel-prohibited)[ RSS](/packages/ljsystem-laravel-prohibited/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Prohibit fields in Laravel FormRequest validations
==================================================

[](#prohibit-fields-in-laravel-formrequest-validations)

This package adds seven new form request validations to your Laravel application that allows you to prohibit fields the same way as you usually require them.

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

[](#installation)

You can install this package via composer using this command:

```
composer require ljsystem/laravel-prohibited
```

The package will automatically register itself.

Usage
-----

[](#usage)

After installing the package you can use the new rules the same way you would use [Laravels official validation](https://laravel.com/docs/validation) rules.

```
$request->validate([
    'vehicle' => 'required|string|in:car,van,truck,bus,motorcycle',
    'speeding' => 'prohibited',
    'convertible' => 'prohibited_if:vehicle,motorcycle|integer',
    'helmet' => 'prohibited_unless:vehicle,motorcycle|bool',
    'hat' => 'prohibited_with:helmet,convertible|bool',
    'sunglasses' => 'prohibited_with_all:helmet,helmet_has_visor|bool',
    'helmet_has_visor' => 'prohibited_without:helmet|bool',
    'helmet_visor_color' => 'prohibited_without_all:helmet,helmet_has_visor|string|in:clear,tinted',
]);
```

Available Validation Rules
--------------------------

[](#available-validation-rules)

- [Prohibited](#prohibited)
- [Prohibited If](#prohibited_ifanotherfieldvalue)
- [Prohibited Unless](#prohibited_unlessanotherfieldvalue)
- [Prohibited With](#prohibited_withfoobar)
- [Prohibited With All](#prohibited_with_allfoobar)
- [Prohibited Without](#prohibited_withoutfoobar)
- [Prohibited Without All](#prohibited_without_allfoobar)

###### **prohibited**

[](#prohibited)

The field under validation must **not** be present in the input data, regardless of it's value.

###### **prohibited\_if:*anotherfield*,*value*...**

[](#prohibited_ifanotherfieldvalue)

The field under validation must **not** be present if the *anotherfield* field is equal to any *value*.

###### **prohibited\_unless:*anotherfield*,*value*,...**

[](#prohibited_unlessanotherfieldvalue)

The field under validation must **note** be present unless the *anotherfield* field is equal to any *value*.

###### **prohibited\_with:*foo*,*bar*,...**

[](#prohibited_withfoobar)

The field under validation must **not** be present *only if* any of the other specified fields are present.

###### **prohibited\_with\_all:*foo*,*bar*,...**

[](#prohibited_with_allfoobar)

The field under validation must **not** be present *only if* all of the other specified fields are present.

###### **prohibited\_without:*foo*,*bar*,...**

[](#prohibited_withoutfoobar)

The field under validation must **not** be present *only when* any of the other specified fields are not present.

###### **prohibited\_without\_all:*foo*,*bar*,...**

[](#prohibited_without_allfoobar)

The field under validation must **not** be present *only when* all of the other specified fields are not present.

Localization
------------

[](#localization)

The package comes with English and Swedish translations out of the box. If you wish to add translations for your own language you publish the translations to your applications resource directory by running the following command:

```
php artisan vendor:publish --provider="Ljsystem\Prohibited\ProhibitedServiceProvider"
```

This will result in the following file structure:

```
.
└── resources
    └── lang
        └── vendor
            └── prohibited
                ├── en
                │   └── validation.php
                └── sv
                    └── validation.php

```

You can now copy either the English or Swedish `validation.php` and translate it into your prefered language. Feel free to create a Pull Request if you would like to get your translations included in the package.

Testing
-------

[](#testing)

You can run the tests with:

```
vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~99 days

Total

2

Last Release

2234d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/985094176641f68541fc64aef58c5177bd13d02b9f6382a1a15ddc6ee110700e?d=identicon)[ljniklas](/maintainers/ljniklas)

---

Top Contributors

[![ljniklas](https://avatars.githubusercontent.com/u/22393893?v=4)](https://github.com/ljniklas "ljniklas (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelvalidationnot allowedljsystemlaravel-prohibitedprohibited

### Embed Badge

![Health badge](/badges/ljsystem-laravel-prohibited/health.svg)

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

###  Alternatives

[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2462.4M7](/packages/laravel-validation-rules-credit-card)[proengsoft/laravel-jsvalidation

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

1.1k2.4M50](/packages/proengsoft-laravel-jsvalidation)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[illuminate/validation

The Illuminate Validation package.

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

Worldwide postal code validation for Laravel

3893.6M1](/packages/axlon-laravel-postal-code-validation)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

762649.9k18](/packages/wendelladriel-laravel-validated-dto)

PHPackages © 2026

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