diff --git a/src/main.rs b/src/main.rs index e8c1e4c..57b2ded 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,6 +40,10 @@ fn main() -> anyhow::Result<()> { let alphabet = dialoguer::Input::::new() .with_prompt("Enter alphabet") .with_initial_text("АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя0123456789 ,.:!?_-+/*='^%#&@$") + .validate_with(|input: &String| { + let chars = input.chars().collect::>(); + util::verify_alphabet(&chars) + }) .interact_text()?; let input = dialoguer::Input::::new() .with_prompt("Enter input")