Skip to content

Commit fbf40a7

Browse files
author
Ahmed TAILOULOUTE
committed
Update console dialog helper documentation
1 parent ac5835f commit fbf40a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/console/helpers/dialoghelper.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,14 @@ in the console, so it is a good practice to put some useful information in it. T
142142
function should also return the value of the user's input if the validation was successful.
143143

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

149+
Each time the user is asked the question, if no answer is supplied, the default one is used
150+
and it's validated using the ``$validator`` callback.
151+
If the validator throws an exception on the last attempt, the exception is displayed to the user.
152+
150153
Validating a Hidden Response
151154
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152155

0 commit comments

Comments
 (0)