PHPackages                             p4bloch/console-validable-question - 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. [CLI &amp; Console](/categories/cli)
4. /
5. p4bloch/console-validable-question

ActiveLibrary[CLI &amp; Console](/categories/cli)

p4bloch/console-validable-question
==================================

Easily Validate Questions in Symfony/Console

0.1.0(11y ago)019MITPHPPHP &gt;=5.4.0

Since Dec 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/p4bloch/console-validable-question)[ Packagist](https://packagist.org/packages/p4bloch/console-validable-question)[ Docs](http://github.com/p4bloch/console-validable-question)[ RSS](/packages/p4bloch-console-validable-question/feed)WikiDiscussions master Synced 1mo ago

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

\#ValidableQuestion Easily validate a Symfony/Console Question.

### Usage

[](#usage)

```
$question = new ValidableQuestion('Who are you?', ['required']);
$question = new ValidableQuestion('How old are you?', ['numeric'], 25);
$question = new ValidableQuestion('Enter your e-mail', ['required', 'email']);

$helper->ask($input, $output, $question);
```

### Why?

[](#why)

Validating a Question in Symfony/Console involves calling `setValidator` on each Question and passing the function that will actually validate it as an argument, which is awesome when you need to do a somehow complex validation, but quite annoying when you simply want to check if the value is not null, or a number, or an e-mail, etc. `ValidableQuestion` extends Console's `Question`, but validates the answer against any rules specified in the background, leaving you with a nice and readable one liner.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

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

Total

2

Last Release

4164d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/465b2f9ec27d108305faef7b10e84a97f93477edacba882d18db5b74f56c6b59?d=identicon)[p4bloch](/maintainers/p4bloch)

---

Top Contributors

[![pechitook](https://avatars.githubusercontent.com/u/3620912?v=4)](https://github.com/pechitook "pechitook (5 commits)")

---

Tags

consolesymfonyvalidation

### Embed Badge

![Health badge](/badges/p4bloch-console-validable-question/health.svg)

```
[![Health](https://phpackages.com/badges/p4bloch-console-validable-question/health.svg)](https://phpackages.com/packages/p4bloch-console-validable-question)
```

###  Alternatives

[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[cerbero/command-validator

Laravel package to validate the input of console commands.

225444.5k1](/packages/cerbero-command-validator)[phlib/console-process

Console implementation.

1833.5k2](/packages/phlib-console-process)[eddiriarte/console-select

A fancy selection interface for symfony's console component.

117.2k2](/packages/eddiriarte-console-select)[zachleigh/artisanize

Use Laravel Artisan command syntax in any Symfony Console project.

122.6k1](/packages/zachleigh-artisanize)

PHPackages © 2026

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