Function prompt_text_with_validation

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