PHPackages                             devlop/laravel-console-input-validation - 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. devlop/laravel-console-input-validation

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

devlop/laravel-console-input-validation
=======================================

Trait to simplify the validation of console input in Laravel commands

1.1.4(6mo ago)0100MITPHPPHP ^7.4|^8.0

Since Mar 1Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/devlop/laravel-console-input-validation)[ Packagist](https://packagist.org/packages/devlop/laravel-console-input-validation)[ RSS](/packages/devlop-laravel-console-input-validation/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (1)Versions (7)Used By (0)

 [![Latest Stable Version](https://camo.githubusercontent.com/16bc75588894748be8845130ac0c4e7db252d7c37a03da5f1762f25c02c6b32e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465766c6f702f6c61726176656c2d636f6e736f6c652d696e7075742d76616c69646174696f6e)](https://packagist.org/packages/devlop/laravel-console-input-validation) [![License](https://camo.githubusercontent.com/20acdddb777f63e6406b322a742c4cf3f9a22286ee41a63a933897dacae7721a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465766c6f702f6c61726176656c2d636f6e736f6c652d696e7075742d76616c69646174696f6e)](https://github.com/devlop/laravel-console-input-validation/blob/master/LICENSE.md)

Laravel Console Input Validation
================================

[](#laravel-console-input-validation)

A small trait to make it easier to validate the input to your Laravel commands.

Installation
============

[](#installation)

```
composer require devlop/laravel-console-input-validation
```

Usage
=====

[](#usage)

```
use Devlop\Laravel\Console\ValidateInput;
use Symfony\Component\Console\Input\InputInterface;

class DemoCommand extends Command
{
    use ValidateInput;

    /**
     * Validate the console command input.
     *
     * @throws InvalidArgumentException
     */
    protected function validate(InputInterface $input) : void
    {
        // Example using manual validation
        if (! is_numeric($input->getOption('limit'))) {
            throw new InvalidArgumentException('--limit must be numeric');
        }

        // Example using webmozarts/assert
        Assert::numeric($input->getOption('limit')); // assert that the --limit option got a numeric value
        Assert::greaterThan($input->getOption('limit'), 0); // assert that the --limit option get a value greater than 0
    }

    public function handle() : int
    {
        // ...
    }
}
```

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance68

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Recently: every ~414 days

Total

6

Last Release

187d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/caa865d4467587eecd242fadf805f15ce436c9d7efa7786b49b69a193c158aaf?d=identicon)[johanrosenson](/maintainers/johanrosenson)

---

Top Contributors

[![johanrosenson](https://avatars.githubusercontent.com/u/10432296?v=4)](https://github.com/johanrosenson "johanrosenson (8 commits)")

---

Tags

artisanlaravelvalidation

### Embed Badge

![Health badge](/badges/devlop-laravel-console-input-validation/health.svg)

```
[![Health](https://phpackages.com/badges/devlop-laravel-console-input-validation/health.svg)](https://phpackages.com/packages/devlop-laravel-console-input-validation)
```

###  Alternatives

[propaganistas/laravel-phone

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

3.0k34.5M83](/packages/propaganistas-laravel-phone)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

751543.1k11](/packages/wendelladriel-laravel-validated-dto)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

214819.8k3](/packages/ashallendesign-laravel-config-validator)[ergebnis/json-schema-validator

Provides a JSON schema validator, building on top of justinrainbow/json-schema.

3525.6M6](/packages/ergebnis-json-schema-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.8M8](/packages/crazybooot-base64-validation)[melihovv/laravel-env-validator

Laravel Validator for the .env file

1639.7k](/packages/melihovv-laravel-env-validator)

PHPackages © 2026

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