Skip to content

Commit bd1bfbe

Browse files
committed
minor #11250 be consistent with ask() example (OskarStark)
This PR was merged into the 3.4 branch. Discussion ---------- be consistent with ask() example and added missing filepath Commits ------- 4b8114d be consistent with ask() example
2 parents 2d77f5d + 4b8114d commit bd1bfbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

console/style.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ User Input Methods
248248

249249
$io->askHidden('What is your password?');
250250

251-
// validates the given answer
251+
In case you need to validate the given value, pass a callback validator as
252+
the second argument::
253+
252254
$io->askHidden('What is your password?', function ($password) {
253255
if (empty($password)) {
254256
throw new \RuntimeException('Password cannot be empty.');
@@ -352,6 +354,7 @@ Then, instantiate this custom class instead of the default ``SymfonyStyle`` in
352354
your commands. Thanks to the ``StyleInterface`` you won't need to change the code
353355
of your commands to change their appearance::
354356

357+
// src/AppBundle/Command/GreetCommand.php
355358
namespace AppBundle\Console;
356359

357360
use AppBundle\Console\CustomStyle;

0 commit comments

Comments
 (0)