Replies: 2 comments
-
I've started something here just so I could play around with the unit tests: tomgrohl@bee6d7a |
Beta Was this translation helpful? Give feedback.
0 replies
-
Going to open a PR and see how I get on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When running commands that require a lot of input from the user, if you get partway through and the input is incorrect in some way, you may have to run the command again (depending on how the command is written to handle bad input).
It would be nice to ask for input and validate in a loop until the value is correct.
Example code below:
In the
askAndValidate
method the user will be prompted in a loop until the validation passes. The Validator facade is used to make and validate the input from the user.I've already got this working with tests locally for an additional project, but thought it might be nice to be included in Laravel's core.
Not sure if this is something that's wanted or whether I can open a PR up for it?
Beta Was this translation helpful? Give feedback.
All reactions