Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - CLI Prompt with Validation #800

Closed
natanfelles opened this issue Oct 28, 2017 · 2 comments
Closed

Feature - CLI Prompt with Validation #800

natanfelles opened this issue Oct 28, 2017 · 2 comments

Comments

@natanfelles
Copy link
Contributor

Hello!

Today I was testing the CLI and it is awesome. 😄

Then I created a Command to insert/update values in a DB table or simply to get validated data.

I see that the prompt() validates required and in_list values. Then I thought about to use the full Validation Library Rules and implemented some adjusts.

With this is possible continue to prompt until the input be valid:

$email = CLI::prompt2('Email', null, 'required|valid_email');

If you think that this can be useful do some analysis in the latest commits of this branch.

@lonnieezell
Copy link
Member

I like this! I would definitely accept that as a PR - but not as a new method. Just redo the existing prompt() method.

@natanfelles
Copy link
Contributor Author

Coding on #808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants