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(5y ago)310[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 6d 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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

2185d 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

[propaganistas/laravel-phone

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

3.0k35.7M107](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

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

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)[galahad/laravel-addressing

Laravel package providing addressing functionality

70316.6k](/packages/galahad-laravel-addressing)

PHPackages © 2026

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