Skip to content

Commit

Permalink
bug #3805 Add missing autocomplete argument in askAndValidate method …
Browse files Browse the repository at this point in the history
…(ifdattic)

This PR was merged into the 2.3 branch.

Discussion
----------

Add missing autocomplete argument in askAndValidate method

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

d8059e2 Add missing autocomplete argument in askAndValidate method
  • Loading branch information
weaverryan committed Apr 28, 2014
2 parents 322972e + d8059e2 commit f801e2e
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit f801e2e

Please sign in to comment.