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

default and allow_empty #316

Open
Masber opened this issue Jul 30, 2024 · 0 comments
Open

default and allow_empty #316

Masber opened this issue Jul 30, 2024 · 0 comments

Comments

@Masber
Copy link

Masber commented Jul 30, 2024

Dear dialoguer community,

I have an example like this

Input::new()
        .with_prompt("Type socks5 proxy URL")
        .default("socks5h://127.0.0.1:1080".to_string())
        .allow_empty(true)
        .interact_text()
        .unwrap();

Would it be possible to allow the user to enter an empty value using default and allow_empty functions combined?

thank you

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

1 participant