Function prompt_password_with_validation

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