pub type ValidateFunc = Box<dyn Fn(&str) -> Result<(), String> + Send + Sync>;
ValidateFunc is a function that returns an error if the input is invalid.
pub struct ValidateFunc(/* private fields */);