prompt_text_with_validation

Function prompt_text_with_validation 

Source
pub fn prompt_text_with_validation<F>(message: &str, validator: F) -> String
where F: Fn(&str) -> Result<(), &str>,
Expand description

Prompts for text input with a validator.

Behavior:

  • On I/O failure, logs an error via output::print and retries.
  • On validation failure, shows a status message and retries.