Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions components/console/helpers/dialoghelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ This methods has 2 new arguments, the full signature is::
string|array $question,
callback $validator,
integer $attempts = false,
string $default = null
string $default = null,
array $autocomplete = null
)

The ``$validator`` is a callback which handles the validation. It should
Expand All @@ -139,8 +140,8 @@ in the console, so it is a good practice to put some useful information in it. T
function should also return the value of the user's input if the validation was successful.

You can set the max number of times to ask in the ``$attempts`` argument.
If you reach this max number it will use the default value, which is given
in the last argument. Using ``false`` means the amount of attempts is infinite.
If you reach this max number it will use the default value.
Using ``false`` means the amount of attempts is infinite.
The user will be asked as long as they provide an invalid answer and will only
be able to proceed if their input is valid.

Expand Down