pub fn number_range<T>(s: &str, min: T, max: T) -> Result<T, String>where T: FromStr + PartialOrd + Display, <T as FromStr>::Err: Display,
Parse a number from a string and check if it is within the specified range.